websphere 8远程ejb NamingException

时间:2016-08-25 07:30:37

标签: java-ee ejb websphere-8

我正在将旧的websphere中的一些遗留代码迁移到websphere 8,并且我在其中一个调用远程EJB的类中遇到了问题。以下是此类使用的代码:

Hashtable env = new Hashtable();
env.put("java.naming.factory.initial", "com.ibm.websphere.naming.WsnInitialContextFactory");
env.put("java.naming.provider.url", "corbaloc:iiop:" + server + ":" + port);

InitialContext ctx = new InitialContext(env);
Object homeobj = ctx.lookup(cell/clusters/n1_cluster/ejb/ReportsHome);

代码在ctx.lookup行抛出异常,这是抛出的异常:

javax.naming.NamingException: Error during resolve
                at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1868) ~[com.ibm.ws.runtime.jar:na]
                at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1777) ~[com.ibm.ws.runtime.jar:na]
                at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1434) ~[com.ibm.ws.runtime.jar:na]
                at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:616) ~[com.ibm.ws.runtime.jar:na]
                at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:165) ~[com.ibm.ws.runtime.jar:na]
                at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179) ~[com.ibm.ws.runtime.jar:na]
                at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:161) ~[na:na]
                at javax.naming.InitialContext.lookup(InitialContext.java:423) ~[na:1.7.0]
org.omg.CORBA.COMM_FAILURE: purge_calls:2131 Reason: CONN_ABORT (1), State: ABORT (5)
                at com.ibm.rmi.iiop.Connection.purge_calls(Connection.java:2130) ~[na:na]
                at com.ibm.rmi.iiop.Connection.doReaderWorkOnce(Connection.java:3379) ~[na:na]
                at com.ibm.rmi.transport.ReaderThread.run(ReaderPoolImpl.java:130) ~[na:na]

我该如何解决这个问题?我在某处阅读过应该使用thinclient.jar,但是我无法在websphere 8或旧的websphere中找到这个jar

0 个答案:

没有答案