Hi,
I configured WSO2 MB as a foreign server to Oracle Weblogic and implemented
a java client to access a queue in MB. My java code is shown below.
Hashtable properties = new Hashtable();
properties.put(Context.
INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
properties.put(Context.PROVIDER_URL, "t3://localhost:7001");
properties.put(Context.SECURITY_PRINCIPAL, "username");
properties.put(Context.SECURITY_CREDENTIALS, "password");
try {
ctx = new InitialContext(properties);
qcf = (QueueConnectionFactory)ctx.lookup(QCF_NAME); // get the
error from here
} catch (NamingException ne) {
ne.printStackTrace(System.err);
System.exit(0);
}
When ctx.lookup is called I get the following error.
javax.naming.ConfigurationException:
org.wso2.andes.client.AMQConnectionFactory [Root exception is
java.rmi.MarshalException: error marshalling return; nested exception is:
java.io.NotSerializableException:
org.wso2.andes.client.AMQConnectionFactory]
at
weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:38)
at
weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:68)
at
weblogic.jndi.internal.WLContextImpl.translateException(WLContextImpl.java:531)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:444)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:426)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at JMSSenderMB.sendMessage(JMSSenderMB.java:40)
at JMSSenderMB.main(JMSSenderMB.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
In my classpath I added andes-client-0.13.wso2v10.jar and
geronimo-jms_1.1_spec-1.1.0.wso2v1.jar. Does anyone knows why I'm getting
this error?
Thank you,
Sajini.
--
Sajini De SIlva
Software Engineer; WSO2 Inc.; http://wso2.com ,
Email: [email protected]
Blog: http://sajinid.blogspot.com/
Git hub profile: https://github.com/sajinidesilva
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev