在jboss

时间:2017-06-06 08:27:53

标签: java jboss ejb jndi naming

我在jboss服务器中部署了一个activemq代理。 activemq部署为放置在jboss独立/部署存储库中的rar文件。 另一个项目也作为耳文在我的jboss中部署 这最后是在我的jboss中暴露了一些ejb对象。 我试图从我放入activemq rar文件的jar文件中获取一个ejb。当我将客户端连接到代理时,会调用放在jar中的类。

这就是我尝试在jar文件中获取ejb的方式:

  Context ctx; 
  Properties jndiProps = new Properties(); 
  jndiProps.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming"); 
  jndiProps.put("jboss.naming.client.ejb.context", true); 
  ctx = new InitialContext(jndiProps); 
  Ctx.lookup("ejb:Hemis/HemisCoreClient//"+ "HardwareDataManagement" + "!" + "com.ubiant.hemis.client.ejb.interf.I_HardwareDataManagement");

在暴露ejb时从jboss登录:

* 11:50:17,538 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor](MSC服务线程1-4)部署单元子部署中名为HardwareDataManagement的会话bean的JNDI绑定" HemisCoreClient。罐子"部署" Hemis.ear"如下:

Java的:全球/赫米斯/ HemisCoreClient / HardwareDataManagement com.ubiant.hemis.client.ejb.interf.I_HardwareDataManagement   Java的:应用程序/ HemisCoreClient / HardwareDataManagement com.ubiant.hemis.client.ejb.interf.I_HardwareDataManagement   Java的:模块/ HardwareDataManagement com.ubiant.hemis.client.ejb.interf.I_HardwareDataManagement   Java的:JBoss的/导出/赫米斯/ HemisCoreClient / HardwareDataManagement com.ubiant.hemis.client.ejb.interf.I_HardwareDataManagement   Java的:全球/赫米斯/ HemisCoreClient / HardwareDataManagement   Java的:应用程序/ HemisCoreClient / HardwareDataManagement   java:module / HardwareDataManagement *

我尝试将客户端连接到代理时出现日志错误:

17:26:15,555 ERROR [stderr](qtp1869699331-251)javax.naming.NameNotFoundException;剩下的名字' java:Hemis / HemisCoreClient // HardwareDataManagement!com.ubiant.hemis.client.ejb.interf.I_HardwareDataManagement' 17:26:15,556 ERROR [stderr](qtp1869699331-251)org.eclipse.jetty.jndi.local.localContextRoot.lookup(localContextRoot.java:490) 17:26:15,557错误[stderr](qtp1869699331-251)org.eclipse.jetty.jndi.local.localContextRoot.lookup(localContextRoot.java:536) 17:26:15,557错误[stderr](qtp1869699331-251)在javax.naming.InitialContext.lookup(InitialContext.java:411) 17:26:15,558 ERROR [stderr](qtp1869699331-251)at authentification.TokenAuthentificationBroker.addConnection(TokenAuthentificationBroker.java:46) 17:26:15,558 ERROR [stderr](qtp1869699331-251)org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:97) 17:26:15,558 ERROR [stderr](qtp1869699331-251)org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:733) 17:26:15,559 ERROR [stderr](qtp1869699331-251)org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:79) 17:26:15,559 ERROR [stderr](qtp1869699331-251)at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139) 17:26:15,560 ERROR [stderr](qtp1869699331-251)org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292) 17:26:15,561 ERROR [stderr](qtp1869699331-251)org.apache.activemq.broker.TransportConnection $ 1.onCommand(TransportConnection.java:149) 17:26:15,562 ERROR [stderr](qtp1869699331-251)org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83) 17:26:15,562 ERROR [stderr](qtp1869699331-251)org.apache.activemq.transport.ws.MQTTSocket.sendToActiveMQ(MQTTSocket.java:112) 17:26:15,563 ERROR [stderr](qtp1869699331-251)org.apache.activemq.transport.mqtt.MQTTProtocolConverter.sendToActiveMQ(MQTTProtocolConverter.java:133) 17:26:15,564 ERROR [stderr](qtp1869699331-251)at org.apache.activemq.transport.mqtt.MQTTProtocolConverter.onMQTTConnect(MQTTProtocolConverter.java:235) 17:26:15,564 ERROR [stderr](qtp1869699331-251)at org.apache.activemq.transport.mqtt.MQTTProtocolConverter.onMQTTCommand(MQTTProtocolConverter.java:157) 17:26:15,566 ERROR [stderr](qtp1869699331-251)org.apache.activemq.transport.ws.MQTTSocket.onMessage(MQTTSocket.java:59) 17:26:15,566 ERROR [stderr](qtp1869699331-251)org.eclipse.jetty.websocket.WebSocketConnectionRFC6455 $ WSFrameHandler.onFrame(WebSocketConnectionRFC6455.java:860) 17:26:15,567 ERROR [stderr](qtp1869699331-251)org.eclipse.jetty.websocket.WebSocketParserRFC6455.parseNext(WebSocketParserRFC6455.java:349) 17:26:15,568 ERROR [stderr](qtp1869699331-251)org.eclipse.jetty.websocket.WebSocketConnectionRFC6455.handle(WebSocketConnectionRFC6455.java:225) 17:26:15,568 ERROR [stderr](qtp1869699331-251)org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) 17:26:15,569 ERROR [stderr](qtp1869699331-251)org.eclipse.jetty.io.nio.SelectChannelEndPoint $ 1.run(SelectChannelEndPoint.java:52) 17:26:15,571 ERROR [stderr](qtp1869699331-251)org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) 17:26:15,571 ERROR [stderr](qtp1869699331-251)org.eclipse.jetty.util.thread.QueuedThreadPool $ 3.run(QueuedThreadPool.java:543) 17:26:15,572错误[stderr](qtp1869699331-251)在java.lang.Thread.run(Thread.java:745)

我该如何解决这个问题?有人能帮助我吗?

0 个答案:

没有答案