I'm trying to enqueue a message on a jms queue (weblogic) from a java application.
InitialContext ctx = getInitialContext();
qconFactory = (QueueConnectionFactory)ctx.lookup("jms.bfred1cf");
qcon = qconFactory.createQueueConnection();
qsession = qcon.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
queue = (Queue) ctx.lookup("jms.bfred1queue");
private static InitialContext getInitialContext() throws NamingException {
Hashtable<String, String> env = new Hashtable<String, String>();
env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
env.put(Context.PROVIDER_URL, "t3://soabpm-vm:7001/");
return new InitialContext(env);
}
When i invoke the getInitalContext() methos it works fine. I got the context. But when trying to get the connection factory, using the context, it gives the following error:
<Exception in thread "main" java.lang.AbstractMethodError: weblogic.rmi.internal.RMIEnvironment.getProperties(Ljava/lang/Object;)Ljava/util/Hashtable;
at weblogic.rjvm.ResponseImpl.getRMIClientTimeout(ResponseImpl.java:281)
at weblogic.rjvm.ResponseImpl.<init>(ResponseImpl.java:42)
at weblogic.rjvm.MsgAbbrevOutputStream.sendRecv(MsgAbbrevOutputStream.java:404)
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:109)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at weblogic.jndi.internal.ServerNamingNode_1035_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:423)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
at javax.naming.InitialContext.lookup(InitialContext.java:409)
at demo.Demo.main(Unknown Source)
Looking into Weblogic console, JNDI Tree I've the following:
JMS:
- ConnectionFactory: name: bfred1cf className: weblogic.rmi.cluster.ClusterableRemoteObjec Binding Name: jms.bfred1cf Class: weblogic.jms.client.JMSXAConnectionFactory
- Queue
name: bfred1queue
className: weblogic.jms.common.WrappedDestinationImpl Binding Name: jms.bfred1queue Class: weblogic.jms.common.DestinationImpl
If i try to enqueue a message from a SOA Suite project (BPEL) with a JMS Adapter, using the Outbound Conection Pool (eis/jms/bfre1) configured for the CF it works fine.
Does anyone have an idea about what can cause this error?
Thanks, Fabio