从Java客户端进行Weblogic连接工厂查找

从Java客户端进行Weblogic连接工厂查找,java,jms,weblogic,Java,Jms,Weblogic,我正在尝试将来自java应用程序的消息排入jms队列(weblogic) InitialContext ctx = getInitialContext(); qconFactory = (QueueConnectionFactory)ctx.lookup("jms.bfred1cf"); qcon = qconFactory.createQueueConnection(); qsession = qcon.createQueueSession(false, QueueSession.AUTO_A

我正在尝试将来自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);
}
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”);
私有静态InitialContext getInitialContext()引发NamingException{
Hashtable env=新的Hashtable();
环境put(Context.INITIAL\u Context\u工厂,“weblogic.jndi.WLInitialContextFactory”);
env.put(Context.PROVIDER_URL,“t3://soabpm-vm:7001/”;
返回新的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)
尝试使用:

wlthint3client.jar

请尝试使用以下命令,而不是wlclient.jar和wljmsclient.jar:

wlthint3client.jar


与wlclient.jar和wljmsclient.jar不同的是,您的客户机或服务器在其类路径中使用的weblogic.jar文件的版本不正确。API的签名不匹配。这几乎就像您的客户端或服务器在其类路径中没有使用正确版本的weblogic.jar文件。API的签名不匹配。