成功呼叫后远程ejb呼叫失败 [英] Remote ejb call failed after successful calls
本文介绍了成功呼叫后远程ejb呼叫失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个奇怪的问题。
我已经安装了JbossAS 7.1.1并成功部署了我的耳朵文件。
I've a strange problem. I've install JbossAS 7.1.1 and deployed my ear file successfully.
我的客户端运行的是tomcat 6.035。
My client is running to tomcat 6.035.
我可以对jboss部署进行成功的EJB调用-但一个特定的EJB调用失败。
I can make successful EJB calls to my jboss deployment - but one specific EJB calls fails.
我的客户端环境设置如下:-
my client environment setup is as below :-
Hashtable<String, String> env = new Hashtable<String, String>();
env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.remote.client.InitialContextFactory");
env.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
env.put(Context.PROVIDER_URL, "remote://localhost:4447");
env.put(Context.SECURITY_PRINCIPAL, "abc");
env.put(Context.SECURITY_CREDENTIALS, "123");
env.put("jboss.naming.client.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT", "false");
env.put("jboss.naming.client.ejb.context", "true");
env.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false");
env.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false");
//env.put("remote.connection.x1.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false");
logger.debug("Added security ");
try {
ctx = new InitialContext(env);
} catch (NamingException e) {
logger.error("Can't get initial context.");
e.printStackTrace();
}
stracktrace非常奇怪。它正在寻找RemoteNamingEJBClient
请帮忙-我不知道。
The stracktrace is very strange. Its looking for RemoteNamingEJBClient Please help - I'm out of idea.
18:03:25,541 WARN [org.jboss.modules] (EJB default - 8) Failed to define class org.jboss.naming.remote.client.ejb.RemoteNamingEjbClientContextSelector in Module "org.jboss.remote-naming:main" from local module loader @50988 (roots: jbossAS7/modules): java.lang.LinkageError: Failed to link org/jboss/naming/remote/client/ejb/RemoteNamingEjbClientContextSelector (Module "org.jboss.remote-naming:main" from local module loader @50988 (roots: jbossAS7/modules))
Caused by: java.lang.NoClassDefFoundError: org/jboss/ejb/client/ContextSelector
Caused by: java.lang.ClassNotFoundException: org.jboss.ejb.client.ContextSelector from [Module "org.jboss.remote-naming:main" from local module loader
推荐答案
我通过在远程命名模块中添加
I've solved this problem by adding
ejb-client模块
ejb-client module in remote-naming module
解决了这个问题
<resources>
<resource-root path="jboss-remote-naming-1.0.2.Final.jar"/>
<!-- Insert resources here -->
</resources>
<dependencies>
<module name="javax.api"/>
<module name="org.jboss.ejb-client" />
<module name="org.jboss.remoting3"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.marshalling"/>
<module name="org.jboss.marshalling.river"/>
</dependencies>
这篇关于成功呼叫后远程ejb呼叫失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文