Java アプリケーションから jms キュー (weblogic) にメッセージをエンキューしようとしています。
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);
}
getInitalContext() メソッドを呼び出すと、正常に動作します。文脈がわかりました。ただし、コンテキストを使用して接続ファクトリを取得しようとすると、次のエラーが発生します。
<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)
Weblogicコンソールを見ると、JNDIツリーは次のとおりです。
JMS:
- ConnectionFactory: 名前: bfred1cf クラス名: weblogic.rmi.cluster.ClusterableRemoteObjec バインディング名: jms.bfred1cf クラス: weblogic.jms.client.JMSXAConnectionFactory
- キュー名:
bfred1queue クラス名: weblogic.jms.common.WrappedDestinationImpl バインディング名: jms.bfred1queue クラス: weblogic.jms.common.DestinationImpl
CF 用に構成されたアウトバウンド接続プール (eis/jms/bfre1) を使用して、JMS アダプターを使用して SOA スイート プロジェクト (BPEL) からメッセージをエンキューしようとすると、正常に動作します。
このエラーの原因について誰か考えがありますか?
ありがとう、ファビオ