3

我正在尝试从远程客户端发送和 esb 消息,但我不断收到此错误:

org.jboss.soa.esb.listeners.message.MessageDeliverException: org.apache.ws.scout.transport.TransportException: java.lang.reflect.InvocationTargetException
    at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:545)
    at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:174)
    at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:155)
    at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:197)
    at cz.certicon.esb.test.SenderESB.sendAMessage(SenderESB.java:24)
    at cz.certicon.esb.test.Manager.sendESBMessage(Manager.java:94)
    at cz.certicon.esb.test.MyFrame.actionPerformed(MyFrame.java:122)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$400(Unknown Source)
    at java.awt.EventQueue$2.run(Unknown Source)
    at java.awt.EventQueue$2.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: org.jboss.soa.esb.services.registry.RegistryException: org.apache.ws.scout.transport.TransportException: java.lang.reflect.InvocationTargetException
    at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:358)
    at org.jboss.internal.soa.esb.services.registry.InVMRegistryInterceptor.findEPRs(InVMRegistryInterceptor.java:85)
    at org.jboss.soa.esb.services.registry.RegistryFactory$HeadRegistryInterceptor.findEPRs(RegistryFactory.java:229)
    at org.jboss.soa.esb.listeners.RegistryUtil.getEprs(RegistryUtil.java:228)
    at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:532)
    ... 42 more
Caused by: javax.xml.registry.JAXRException: org.apache.ws.scout.transport.TransportException: java.lang.reflect.InvocationTargetException
    at org.apache.ws.scout.registry.BusinessQueryManagerV3Impl.findConcepts(BusinessQueryManagerV3Impl.java:535)
    at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.getJBossESBTModel(JAXRRegistryImpl.java:795)
    at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:327)
    ... 46 more

我找到了很多关于设置远程客户端的教程,但没有一个对我有帮助。

我正在使用带有 ESB 4.11 的 JBoss AS 6,并从 Eclipse(使用 JBoss 工具)运行我的应用程序。发送 JMS 消息工作正常,但我无法完成这项工作。

这是我发送 esb 消息的示例代码:

public void sendAMessage(String message) throws Exception {

         System.setProperty("javax.xml.registry.ConnectionFactoryClass",

                    "org.apache.ws.scout.registry.ConnectionFactoryImpl");



           Message esbMessage = MessageFactory.getInstance().getMessage();

            esbMessage.getBody().add(message);

            new ServiceInvoker("FirstServiceESB", "SimpleListener").deliverAsync(esbMessage);

    }

1) 我导入了 JBossESB 运行时和 JBoss 6.0 运行时(包括它们提供的所有库)。

2) 我包括了 jbossts-common.jar

3) 我在 META-INF 目录中有 jboss-esb.xml、uddi.xml 和 jbossesb-properties.xml(我将这些文件作为附件包含在内,最后两个是从 helloworld quickstart 复制的...)

老实说,我不知道该怎么做才能使它起作用……感谢您提供任何帮助!

编辑:我已经阅读了一些关于这个的主题,现在我得到了上面提到的错误。我已经包含了他们建议的所有 .jar 库和 .xml 文件,但我仍然卡住了。问题可能出在其他地方吗?

4

1 回答 1

1

首先你需要下载

http://www.redhat.com/products/jbossenterprisemiddleware/soa/download.html(jboss-soa-p-5平台)

并在eclipse项目中设置-->首选项--esb运行时--jboss-soa-p-5。它将解决所有异常。

于 2013-08-20T10:41:17.260 回答