逗人,Wildfly10(EAP 7)调用的JBoss 5.0.1 EJB没有遗留罐子
我试图从Wildfly 10或EAP 7.
我的代码调用的JBoss 5.0.1 EJB3:
final Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
env.put("java.naming.factory.url.pkgs", "org.jboss.ejb.client.naming");
env.put(Context.PROVIDER_URL, "remoting://localhost:1099");
env.put("org.jboss.ejb.client.scoped.context", "true");
InitialContext initialContext = new InitialContext(env);
TestBeanRemote remote = (TestBeanRemote) initialContext.lookup(
"ejb:TestEar/TestBean/TestBean!com.test.TestBeanRemote");
但它说:
Exception in thread "main" java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:BilllingFacadeCallbackEAR, moduleName:BilllingFacadeCallback, distinctName:] combination for invocation context [email protected]
at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:798)
at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:128)
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:186)
at org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:255)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:200)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:183)
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:146)
at com.sun.proxy.$Proxy2.getActions(Unknown Source)
at TestStandalone.main(TestStandalone.java:28)
有没有什么解决调用原有的JBoss不老坛子?
#1是的,它被部署。我已成功将它与传统ejb客户端库连接起来。 \t \t properties.put(“java.naming.factory.initial”,“org.jnp.interfaces.NamingContextFactory”); \t \t properties.put(“java.naming.factory.url.pkgs”,“org.jboss.naming:org.jnp.interfaces”); #2我从Eap 7调用EJB – user1028269
由于以下原因,发生了此问题,请检查: - 连接中断 - 安全性:用户/传递无效 - EJB缺失:已连接,但ejb不存在 - SSL - 正确的端口 - 正确的IP地址 –