I tried to enable JMS transport on WSO2 ESB with Tibco EMS.
With Tibco BW 6.3.0 - copied the below client jars to {wso2esb-4.8.0}\repository\components\lib
tibjms.jar, jms.jar - working without any issues.
With Tibco EMS 8.0 -copied the below client jars to {wso2esb-4.8.0}\repository\components\lib
tibjms.jar, jms-2.0.jar - Results exception as ClassNotFound.
As per WSO2 ESB documentation, it supports only JMS 1.1 and 1.0.2b spec. So tried with Combination of jars.
https://docs.wso2.org/display/ESB481/JMS+Transport#JMSTransport-JMSConnectionFactoryParameters
i.e. Jms.jar from Tibco-6.3.0 and tibjms.jar from Tibco 8.0 - Results same exception as ClassNotFound. Below is the exception Stack trace.
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)
at com.tibco.tibjms.naming.TibjmsContext.lookup(TibjmsContext.java:491)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at org.apache.axis2.transport.jms.JMSUtils.lookup(JMSUtils.java:583)
at org.apache.axis2.transport.jms.JMSConnectionFactory.(JMSConnectionFactory.java:93)
at org.apache.axis2.transport.jms.JMSConnectionFactoryManager.loadConnectionFactoryDefinitions(JMSConnectionFactoryManager.java:58)
at org.apache.axis2.transport.jms.JMSConnectionFactoryManager.(JMSConnectionFactoryManager.java:45)
at org.apache.axis2.transport.jms.JMSSender.init(JMSSender.java:67)
at org.apache.axis2.context.ConfigurationContextFactory.initTransportSenders(ConfigurationContextFactory.java:300)
at org.apache.axis2.context.ConfigurationContextFactory.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)
at org.wso2.carbon.core.init.CarbonServerManager.start(CarbonServerManager.java:219)
at org.wso2.carbon.core.internal.CarbonCoreServiceComponent.activate(CarbonCoreServiceComponent.java:77)
Trasport Configuration in 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>
As Tibco 8.0 support backward compatibility. we are interested to integrate esb with tibco 8.0 version. Please let me know the way to resolve this issue.
You have to include also jms-2.0.jar that comes in EMS 8.0 distribution. That is where your missing class is.
HTH.
I had a similar issue with WebSphere and Tibco 8. Adding both jars - tibjms.jar and ms-2.0.jar to classpath solved the issue
Mahesh.
I had a similar issue some days ago. I think the problem is related with OSGi and the classloaders loading order. I had solved it using the OSGi plugins that comes with EMS 8.2 (I did not know if also with previous 8.x), and referencing them from the plugins that need them.
Related
first of all: I'm quite new to the WSO2 products but I have taken the time to read through some post regarding to my issue.
What product I use: WSO EI 6.1.1
What I want to achive: Establish a JMS-Connection to an TIBCO EMS (MOM), subscribe for a given topic and write the recived message to the filesystem as xml file. The given folder is a mounted netdrive and further applications will look up for new files inside the given folder, this is due to legacy code and I don't want (dont have the time) to change the folder lookup for e.g. a soap calls.
What I've already done: I've read through the latest documentation and found this one:
Configure with Tibco EMS
After some try and error I think I've achived to setting up the JMS Listener for the TIBCO EMS. At the beginning I've received a bunch of connection and auth errors which are fixed now, so I think the general connection to the tibco server works.
<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="TopicConnectionFactory" locked="false">
<parameter locked="false" name="java.naming.factory.initial">com.tibco.tibjms.naming.TibjmsInitialContextFactory</parameter>
<parameter locked="false" name="java.naming.provider.url">tcp://172.123.123.123:123</parameter>
<parameter locked="false" name="java.naming.security.principal">user</parameter>
<parameter locked="false" name="java.naming.security.credentials">pass</parameter>
<parameter locked="false" name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
<parameter locked="false" name="transport.jms.JMSSpecVersion">1.0.2b</parameter>
<parameter locked="false" name="transport.jms.ConnectionFactoryType">topic</parameter>
<parameter locked="false" name="transport.jms.UserName">user</parameter>
<parameter locked="false" name="transport.jms.Password">pass</parameter>
<parameter locked="false" name="transport.jms.CacheLevel">session</parameter>
</parameter>
</transportReceiver>
I think the next step would be to subscribe to the specific topic and write it to the filesystem but I'm kind of stuck here. The other examples in the documentation sadly doesn't help me here, maybe I'm missing the big picture how to continue here because I'm quite new to the esb / ei product.
I simply don't know which functional component is needed (endpoint, proxy, to make use of the configured jms connection and how to write it to the filesystem.
It would be great if someone could push me into the right direction.
kind regards
First you need to have a JMS proxy or a inbound endpoint to listen on your queue. Refer [1]. Then you need to use the file processing capabilities of WSO2 ESB (VFS transport). Refer [2] on fileWriteSequence sequence.After receiving a message from the queue, you should invoke this type of a sequence in your proxy service or the inbound endpoint.
[1] - https://docs.wso2.com/display/ESB500/ESB+as+a+JMS+Consumer
[2] - https://docs.wso2.com/display/ESB500/Sample+271%3A+File+Processing#Sample271:FileProcessing-CreateandConfigurefileWriteSequence
I am administering an instance of WSO2 WSAS 3.1. After searching for the documentation, I couldn't find anything related to how to change ssl/tls protocols.
Does anyone knows how can I disable the SSLv3 in this version of WSO2 WSAS?
Thanks in advance
To solve the problem I had to change the SSL/TLS protocols in [wso2_home]/conf/transports.xml
FROM:
<transport name="https" class="org.wso2.carbon.server.transports.http.HttpsTransport">
<parameter name="port">9443</parameter>
<parameter name="sslProtocol">TLS</parameter>
TO:
<transport name="https" class="org.wso2.carbon.server.transports.http.HttpsTransport">
<parameter name="port">9443</parameter>
<parameter name="sslProtocols">SSLv2Hello,TLSv1</parameter>
Then stop and start the service.
When sending from ESB 4.9.0 API to RabbitMQ with this transport string:
<send>
<endpoint>
<address name="scalehouse_001_rabbitmq" trace="enable" uri="rabbitmq:/ScaleHouses?rabbitmq.server.host.name=localhost&rabbitmq.server.port=5672&rabbitmq.server.user.name=guest&rabbitmq.server.password=guest&rabbitmq.queue.name=scalehouse_001"/>
</endpoint>
</send>
I get this error:
java.lang.NullPointerException at org.apache.axis2.transport.rabbitmq.RabbitMQMessage.<init>(RabbitMQMessage.java:43) at org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendOverAMQP(RabbitMQSender.java:84) at org.apache.axis2.transport.rabbitmq.RabbitMQSender.sendMessage(RabbitMQSender.java:72) at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442) at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:185) at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:167) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149) at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:542) at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:79)
Does anyone have experience with RabbitMQ transport, and can provide insight into potential causes?
I think the issue is in your axis2.xml configuration. Please follow the below steps.
under the transport receivers section in axis2.xml, find the rabbitmq transport receiver and replace it with your configuration. A sample configuration is given here to help you.
<transportReceiver name="rabbitmq" class="org.apache.axis2.transport.rabbitmq.RabbitMQListener">
<parameter name="AMQPConnectionFactory" locked="false">
<parameter name="rabbitmq.server.host.name" locked="false">localhost</parameter>
<parameter name="rabbitmq.server.port" locked="false">5672</parameter>
<parameter name="rabbitmq.server.user.name" locked="false">guest</parameter>
<parameter name="rabbitmq.server.password" locked="false">guest</parameter>
<parameter name="rabbitmq.connection.retry.interval" locked="false">10000</parameter>
<parameter name="rabbitmq.connection.retry.count" locked="false">5</parameter>
</parameter>
</transportReceiver>
From above configuration WSO2 ESB can act as a RabbitMQ consumer. Then locate the transport sender element in axis2.xml for the rabbitmq and uncomment it. A sample configuration for rabbitmq sender is given below.
<transportSender name="rabbitmq" class="org.apache.axis2.transport.rabbitmq.RabbitMQSender"/>
After applying this line of code, WSO2 ESB can act as a RabbitMQ producer where it can produce messages to a given RabbitMQ queue or topic.
For more on this you can find here.
http://ravindraranwala.blogspot.com/2015/09/rabbitmq-transport-in-wso2-esb.html
I use WSO2 ESB 4.7.0 and WSO2 BAM 2.4.0. And I use same server for them. when I made loading test for 200 concurrent thread, ESB unreachable state.
I use http-nio
<transportReceiver name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOListener">
<parameter name="port" locked="false">8280</parameter>
<parameter name="non-blocking" locked="false">true</parameter>
<parameter name="httpGetProcessor" locked="false">org.wso2.carbon.transport.nhttp.api.NHttpGetProcessor</parameter>
</transportReceiver>
for ESB Level Performance settings
# HTTP Sender thread pool parameters
snd_t_core=450
snd_t_max=500
snd_alive_sec=5
snd_qlen=-1
snd_io_threads=4
# HTTP Listener thread pool parameters
lst_t_core=450
lst_t_max=500
lst_alive_sec=5
lst_qlen=-1
lst_io_threads=4
is there a problem performance settings? or problem OS Level?
I installed a fresh WSO2 ESB version 4.2.3 (last stable up to now) and I configured the JMS transport in the axis2.xml file as following:
<!-- Configuration for JBoss 4.2.2 GA MQ -->
<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="SMSOUTQueueConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.jnp.interfaces.NamingContextFactory</parameter>
<parameter name="java.naming.factory.url.pkgs" locked="false">org.jboss.naming:org.jnp.interfaces</parameter>
<parameter name="java.naming.provider.url" locked="false">jnp://192.168.10.125:1100</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">ConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
<parameter name="transport.jms.Destination" locked="true">queue/SMSOUTQueue</parameter>
</parameter>
</transportReceiver>
Immediately after, during the startup an error has been found:
15:09:16,585 INFO [STDOUT] 15:09:16,585 ERROR [BaseUtils] JNDI lookup of name ConnectionFactory returned a org.jboss.mq.SpyConnectionFactory while a interface javax.jms.ConnectionFactory was expected
15:09:16,587 INFO [STDOUT] 15:09:16,585 ERROR [ListenerManager] Couldn't initialize the jmstransport listener
org.apache.axis2.transport.base.BaseTransportException: JNDI lookup of name ConnectionFactory returned a org.jboss.mq.SpyConnectionFactory while a interface javax.jms.ConnectionFactory was expected
at org.apache.axis2.transport.base.BaseUtils.handleException(BaseUtils.java:167)
at org.apache.axis2.transport.jms.JMSUtils.lookup(JMSUtils.java:522)
at org.apache.axis2.transport.jms.JMSConnectionFactory.<init>(JMSConnectionFactory.java:92)
at org.apache.axis2.transport.jms.JMSConnectionFactoryManager.loadConnectionFactoryDefinitions(JMSConnectionFactoryManager.java:58)
at org.apache.axis2.transport.jms.JMSConnectionFactoryManager.<init>(JMSConnectionFactoryManager.java:45)
at org.apache.axis2.transport.jms.JMSListener.doInit(JMSListener.java:58)
at org.apache.axis2.transport.base.AbstractTransportListenerEx.init(AbstractTransportListenerEx.java:62)
at org.apache.axis2.engine.ListenerManager.init(ListenerManager.java:84)
at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:386)
at org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServerManager.java:273)
at org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2ConfigItemListener.java:117)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:916)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:220)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:330)
I found a lot of posts where people say to remove the ...WEB-INF/lib/geronimo-jms_1.1_spec-1.1.0.wso2v1.jar, because otherwise synapse doesn't work with any external JMS broker (I found same answer also for Mule ESB), but for me this solution doesn't work.
The problem is very similar to this link.
Any help is very appreciated. Thanks a lot in advance.
This is a bit late reply. But I also encountered same error and able to fix.When trying to connect to a JMS queue deployed in a JBoss Server from WSO2 ESB 4.6.0 and even with removing the jar geronimo-jms_1.1_spec-1.1.0.wso2v1.jar,your mentioned issue was not fixed.
The reason for that is,in your added jboss related jars to ESB/repository/components/lib,there are some other jars,exposing the implementation for javax.jms.. For example in my case there were two additional jars called jboss-j2ee.jar and jbossall-client.jar exposing javax.jms.. What I did was I opened the two jars and removed the exposing package part of javax.jms.* from both.Then the issue was fixed.
Thanks;