Hi Lorenzo
You class does work! This is what I did..
Used the latest Synapse trunk build (you may try 1.0-RC1-Build 2 from
http://people.apache.org/~asankha/builds/) and copied your class into
the lib folder. I just added a System.out.println("***") since the
log4j.properties used by Synapse does NOT dump your package.
used the following synapse.xml
<definitions xmlns="http://ws.apache.org/ns/synapse">
<class name="myMediator"/>
<log level="full"/>
<send/>
</definitions>
Used "ant stockquote" client, having started the sample server with the
SimpleStockQuoteDeployed... and saw the following output
...
[HttpClientWorker-1] DEBUG ClassMediator - Class mediator
<myMediator>:: mediate()
***
[HttpClientWorker-1] DEBUG LogMediator - Log mediator :: mediate()
...
asankha
Lorenzo wrote:
hi all,
i rewrite myMediator class:
import org.apache.synapse.mediators.AbstractMediator;
import org.apache.synapse.MessageContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.synapse.Constants;
public class myMediator extends AbstractMediator {
private static final Log log =
LogFactory.getLog(myMediator.class);
public boolean mediate(MessageContext synCtx){
log.debug("myMediator mediate is called!!");
return true;
}
}
but i still receive this error at runtime:
[HttpConnection-8008-1] DEBUG ClassMediator - Class mediator
<myMediator>:: mediate()
[HttpConnection-8008-1] ERROR ClassMediator - Error while creating an
instance of the specified mediator class : myMediator
java.lang.IllegalAccessException: Class
org.apache.synapse.mediators.ext.ClassMediator can not access a member
of class myMediator with modifiers ""
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
at java.lang.Class.newInstance0(Class.java:344)
...
...
Where is the mistake?
thx
On gio, 2007-03-22 at 22:05 +0530, Asankha C. Perera wrote:
Lorenzo
[HttpConnection-8008-1] ERROR ClassMediator - Error while creating an
instance of the specified mediator class : myMediator
java.lang.IllegalAccessException: Class
org.apache.synapse.mediators.ext.ClassMediator can not access a member
of class myMediator with modifiers ""
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
at java.lang.Class.newInstance0(Class.java:344)
Where i'm wrong?
Make your class and any constructors (if any) public
asankha
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
|