我尝试使用 Tibco EMS 在 WSO2 ESB 上启用 JMS 传输。
使用 Tibco BW 6.3.0 - 将以下客户端 jar 复制到{wso2esb-4.8.0}\repository\components\lib
tibjms.jar, jms.jar
- 工作没有任何问题。
使用 Tibco EMS 8.0 - 将以下客户端 jar 复制到{wso2esb-4.8.0}\repository\components\lib
tibjms.jar, jms-2.0.jar
- 结果异常为 ClassNotFound。
根据 WSO2 ESB 文档,它仅支持 JMS 1.1 和 1.0.2b 规范。所以尝试了组合罐子。
https://docs.wso2.org/display/ESB481/JMS+Transport#JMSTransport-JMSConnectionFactoryParameters
即来自 Tibco-6.3.0 的 Jms.jar 和来自 Tibco 8.0 的 tibjms.jar - 结果与 ClassNotFound 相同的异常。下面是异常堆栈跟踪。
java.lang.NoClassDefFoundError: javax/jms/JMSContext at com.tibco.tibjms.naming.TibjmsContext$Messenger.(TibjmsContext.java:316) at com.tibco.tibjms.naming.TibjmsContext.lookup(TibjmsContext.java:651)在 com.tibco.tibjms.naming.TibjmsContext.lookup(TibjmsContext.java:491) 在 javax.naming.InitialContext.lookup(InitialContext.java:411) 在 org.apache.axis2.transport.jms.JMSUtils.lookup(JMSUtils .java:583) org.apache.axis2.transport.jms.JMSConnectionFactory.(JMSConnectionFactory.java:93) org.apache.axis2.transport.jms.JMSConnectionFactoryManager.loadConnectionFactoryDefinitions(JMSConnectionFactoryManager.java:58) org.apache .axis2.transport.jms.JMSConnectionFactoryManager.(JMSConnectionFactoryManager.java:45) 在 org.apache.axis2.transport.jms.JMSSender。init(JMSSender.java:67) 在 org.apache.axis2.context.ConfigurationContextFactory.initTransportSenders(ConfigurationContextFactory.java:300) 在 org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:231) 在 org.apache .axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:93) 在 org.wso2.carbon.core.CarbonConfigurationContextFactory.createNewConfigurationContext(CarbonConfigurationContextFactory.java:65) 在 org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager .java:398) 在 org.wso2.carbon.core.init.CarbonServerManager.start(CarbonServerManager.java:219) 在 org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(CarbonCoreServiceComponent.java:77)java:67) 在 org.apache.axis2.context.ConfigurationContextFactory.initTransportSenders(ConfigurationContextFactory.java:300) 在 org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:231) 在 org.apache.axis2.context .ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:93) at org.wso2.carbon.core.CarbonConfigurationContextFactory.createNewConfigurationContext(CarbonConfigurationContextFactory.java:65) at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:398 ) 在 org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(CarbonCoreServiceComponent.java:77) 的 org.wso2.carbon.core.init.CarbonServerManager.start(CarbonServerManager.java:219)java:67) 在 org.apache.axis2.context.ConfigurationContextFactory.initTransportSenders(ConfigurationContextFactory.java:300) 在 org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:231) 在 org.apache.axis2.context .ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:93) at org.wso2.carbon.core.CarbonConfigurationContextFactory.createNewConfigurationContext(CarbonConfigurationContextFactory.java:65) at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:398 ) 在 org.wso2.carbon.core.init.CarbonServerManager.start(CarbonServerManager.java:219) 在 org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(CarbonCoreServiceComponent.java:77)axis2.context.ConfigurationContextFactory.initTransportSenders(ConfigurationContextFactory.java:300) 在 org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:231) 在 org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java: 93) 在 org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:398) 在 org.wso2.carbon.core 的 org.wso2.carbon.core.CarbonConfigurationContextFactory.createNewConfigurationContext(CarbonConfigurationContextFactory.java:65) .init.CarbonServerManager.start(CarbonServerManager.java:219) 在 org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(CarbonCoreServiceComponent.java:77)axis2.context.ConfigurationContextFactory.initTransportSenders(ConfigurationContextFactory.java:300) 在 org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:231) 在 org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java: 93) 在 org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:398) 在 org.wso2.carbon.core 的 org.wso2.carbon.core.CarbonConfigurationContextFactory.createNewConfigurationContext(CarbonConfigurationContextFactory.java:65) .init.CarbonServerManager.start(CarbonServerManager.java:219) 在 org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(CarbonCoreServiceComponent.java:77)initTransportSenders(ConfigurationContextFactory.java:300) 在 org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:231) 在 org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:93) 在 org.wso2 .carbon.core.CarbonConfigurationContextFactory.createNewConfigurationContext(CarbonConfigurationContextFactory.java:65) at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:398) at org.wso2.carbon.core.init.CarbonServerManager.start (CarbonServerManager.java:219) 在 org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(CarbonCoreServiceComponent.java:77)initTransportSenders(ConfigurationContextFactory.java:300) 在 org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:231) 在 org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:93) 在 org.wso2 .carbon.core.CarbonConfigurationContextFactory.createNewConfigurationContext(CarbonConfigurationContextFactory.java:65) at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:398) at org.wso2.carbon.core.init.CarbonServerManager.start (CarbonServerManager.java:219) 在 org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(CarbonCoreServiceComponent.java:77)init(ConfigurationContextFactory.java:231) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:93) at org.wso2.carbon.core.CarbonConfigurationContextFactory.createNewConfigurationContext(CarbonConfigurationContextFactory.java:65) at org.wso2 .carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:398) 在 org.wso2.carbon.core.init.CarbonServerManager.start(CarbonServerManager.java:219) 在 org.wso2.carbon.core.internal.CarbonCoreServiceComponent .activate(CarbonCoreServiceComponent.java:77)init(ConfigurationContextFactory.java:231) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:93) at org.wso2.carbon.core.CarbonConfigurationContextFactory.createNewConfigurationContext(CarbonConfigurationContextFactory.java:65) at org.wso2 .carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:398) 在 org.wso2.carbon.core.init.CarbonServerManager.start(CarbonServerManager.java:219) 在 org.wso2.carbon.core.internal.CarbonCoreServiceComponent .activate(CarbonCoreServiceComponent.java:77)CarbonConfigurationContextFactory.createNewConfigurationContext(CarbonConfigurationContextFactory.java:65) at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:398) at org.wso2.carbon.core.init.CarbonServerManager.start(CarbonServerManager.java: 219)在 org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(CarbonCoreServiceComponent.java:77)CarbonConfigurationContextFactory.createNewConfigurationContext(CarbonConfigurationContextFactory.java:65) at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:398) at org.wso2.carbon.core.init.CarbonServerManager.start(CarbonServerManager.java: 219)在 org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(CarbonCoreServiceComponent.java:77)
axis2.xml 中的运输配置
<transportReceiver class="org.apache.axis2.transport.jms.JMSListener" name="jms">
<parameter locked="false" name="ESB-POC-CF-00">
<parameter locked="false" name="java.naming.factory.initial">com.tibco.tibjms.naming.TibjmsInitialContextFactory</parameter>
<parameter locked="false" name="java.naming.provider.url">tcp://127.0.0.1:7222</parameter>
<parameter locked="false" name="java.naming.security.principal">admin</parameter>
<parameter locked="false" name="java.naming.security.credentials"/>
<parameter locked="false" name="transport.jms.ConnectionFactoryJNDIName">ESB-POC-CF-00</parameter>
<parameter locked="false" name="transport.jms.JMSSpecVersion">1.1</parameter>
<parameter locked="false" name="transport.jms.ConnectionFactoryType">queue</parameter>
<parameter locked="false" name="transport.jms.UserName">xprk119</parameter>
<parameter locked="false" name="transport.jms.Password">esb119</parameter>
</parameter>
由于 Tibco 8.0 支持向后兼容。我们有兴趣将 esb 与 tibco 8.0 版本集成。请让我知道解决此问题的方法。