I am trying publish axis2(axis2-1.6.2) web service over https for that am trying to configure keystore details in my axis2.xml as below,
<transportReceiver name="https"
class="org.apache.axis2.transport.http.AxisServletListener">
<parameter name="port" locked="false">9002</parameter>
<parameter name="non-blocking" locked="false">true</parameter>
<parameter name="keystore" locked="false">
<KeyStore>
<Location>D:/Keys/server.jks</Location>
<Type>JKS</Type>
<Password>western</Password>
<KeyPassword>western</KeyPassword>
</KeyStore>
</parameter>
<parameter name="truststore" locked="false">
<TrustStore>
<Location>D:/Keys/server.jks</Location>
<Type>JKS</Type>
<Password>western</Password>
</TrustStore>
</parameter>
</transportReceiver>
The above configuration doesn't work
If i use HttpCoreNIOSSLListener instead of AxisServletListener, am getting the below error messages
12:36:03,452 ERROR [ListenerManager] Couldn't initialize the httpstransport listener
java.lang.NullPointerException
at org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener.getSSLContext(HttpCoreNIOSSLListener.java:97)
at org.apache.axis2.transport.nhttp.HttpCoreNIOListener.init(HttpCoreNIOListener.java:151)
at org.apache.axis2.engine.ListenerManager.init(ListenerManager.java:83)
at org.apache.axis2.transport.http.AxisServlet.initTransports(AxisServlet.java:503)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:458)
at org.apache.axis2.webapp.AxisAdminServlet.init(AxisAdminServlet.java:60)
12:36:03,492 INFO [HttpCoreNIOListener] HTTP Listener starting on port : 9002
12:36:03,582 ERROR [STDERR] java.lang.IllegalArgumentException: SSL context may not be null
12:36:03,583 ERROR [STDERR] at org.apache.axis2.transport.nhttp.SSLServerIOEventDispatch.<init>(SSLServerIOEventDispatch.java:56)
12:36:03,586 ERROR [STDERR] at org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener.getEventDispatch(HttpCoreNIOSSLListener.java:57)
12:36:04,038 ERROR [STDERR] at org.apache.axis2.transport.nhttp.HttpCoreNIOListener.startServerEngine(HttpCoreNIOListener.java:85)
Any input is welcome!
Related
I have the next error in the product WSO2 EI 6.6.0.
{org.apache.synapse.transport.passthru.PassThroughHttpSSLSender} - System may be unstable: HTTPS ConnectingIOReactor encountered a runtime exception : null java.lang.NullPointerException
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:193)
at org.apache.synapse.transport.http.conn.ClientSSLSetupHandler$1.verify(ClientSSLSetupHandler.java:82)
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:159)
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:147)
at org.apache.synapse.transport.http.conn.ClientSSLSetupHandler.verify(ClientSSLSetupHandler.java:181)
at org.apache.http.nio.reactor.ssl.SSLIOSession.doHandshake(SSLIOSession.java:313)
at org.apache.http.nio.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSession.java:424)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:119)
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:159)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:338)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:316)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:277)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:105)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:586)
at java.lang.Thread.run(Thread.java:748)
I am only trying to do a call mediator
<call>
<endpoint name="GETToken">
<address uri="api.backend"/>
</endpoint>
</call>
I am using a proxy in the axis2.xml file and in the integrator.sh file like:
axis2.xml
<transportSender name="http" class="org.apache.synapse.transport.passthru.PassThroughHttpSender">
<parameter name="non-blocking" locked="false">true</parameter>
<!--<parameter name="warnOnHTTP500" locked="false">*</parameter>
<parameter name="http.proxyHost" locked="false">proxy.com</parameter>
<parameter name="http.proxyPort" locked="false">8080</parameter>-->
<parameter name="http.nonProxyHosts" locked="false">.*.domain.com|localhost|10.*.*.*</parameter>
</transportSender>
<transportSender name="https" class="org.apache.synapse.transport.passthru.PassThroughHttpSSLSender">
<parameter name="non-blocking" locked="false">true</parameter>
<!--<parameter name="http.proxyHost" locked="false">proxy.com</parameter>
<parameter name="http.proxyPort" locked="false">8080</parameter> -->
<parameter name="http.nonProxyHosts" locked="false">.*.domain.com|localhost|10.*.*.*</parameter>
<parameter name="keystore" locked="false">
integrator.sh
-Dhttps.proxyHost="proxy.com" \
-Dhttps.proxyPort="8080" \
-Dhttp.proxyHost="proxy.com" \
-Dhttp.proxyPort="8080" \
-Dhttp.nonProxyHosts="localhost|10.*.*.*|*.domain.com" \
I see the next question, but it hasn't any response:
Error in EI - System may be unstable: HTTPS ConnectingIOReactor encountered a runtime exception
The problem was related with HostName verification, so I change the next line
<parameter name="HostnameVerifier">Strict|AllowAll|DefaultAndLocalhost</parameter>
in the axis2.xml that you can find in the route: wso2ei-6.6.0\conf\axis2
I am trying to connect WSO2 Enterprise Integrator with IBM Websphere MQ v 8.0.0.5 by JMS Transport. The purpose is to be able to receive/publish messages on Queues that are made in IBM Websphere MQ via WSO2 Enterprise Integrator using JMS Protocol.
Link:
I followed this link provided by WSO2 official documentation. I followed all the steps exactly but when I deploy the JMS Listener Proxy, it becomes a faulty service and It shows me the following error on the console:
Error Stack Trace:
com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED').
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:203)
at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:412)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:8475)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:7913)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl._createConnection(JmsConnectionFactoryImpl.java:299)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:236)
at com.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6024)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:136)
at com.ibm.mq.jms.MQQueueConnectionFactory.createConnection(MQQueueConnectionFactory.java:209)
at org.apache.axis2.transport.jms.JMSUtils.createConnection(JMSUtils.java:786)
at org.apache.axis2.transport.jms.JMSListener.checkJMSConnection(JMSListener.java:155)
at org.apache.axis2.transport.jms.JMSListener.startEndpoint(JMSListener.java:99)
at org.apache.axis2.transport.jms.JMSListener.startEndpoint(JMSListener.java:54)
at org.apache.axis2.transport.base.AbstractTransportListenerEx.startListeningForService(AbstractTransportListenerEx.java:154)
at org.apache.axis2.transport.base.AbstractTransportListener.internalStartListeningForService(AbstractTransportListener.java:213)
at org.apache.axis2.transport.base.AbstractTransportListener$2.serviceAdded(AbstractTransportListener.java:126)
at org.apache.axis2.transport.base.tracker.AxisServiceTracker.serviceAdded(AxisServiceTracker.java:212)
at org.apache.axis2.transport.base.tracker.AxisServiceTracker$1.serviceUpdate(AxisServiceTracker.java:98)
at org.apache.axis2.engine.AxisConfiguration.notifyObservers(AxisConfiguration.java:666)
at org.apache.axis2.engine.AxisConfiguration.addServiceGroup(AxisConfiguration.java:420)
at org.apache.axis2.engine.AxisConfiguration.addService(AxisConfiguration.java:350)
at org.apache.synapse.core.axis2.ProxyService.buildAxisService(ProxyService.java:750)
at org.wso2.carbon.proxyadmin.service.ProxyServiceAdmin.addProxyService(ProxyServiceAdmin.java:273)
at org.wso2.carbon.proxyadmin.service.ProxyServiceAdmin.addProxy(ProxyServiceAdmin.java:710)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Proxy Service Code as mentioned in documentation:
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="MyJMSProxy"
transports="jms"
startOnLoad="true"
trace="disable">
<description/>
<target>
<inSequence>
<log level="full"/>
<drop/>
</inSequence>
</target>
<parameter name="transport.jms.Destination">LocalQueue1</parameter>
</proxy>
Axis2 File Configuration:
Following are axis2 configurations for transport receiver and transport listener.
Transport Receiver:
<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="default" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">file:/C:/jndidirectory</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">MyQueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
<parameter name="transport.jms.UserName" locked="false">omerk</parameter>
<parameter name="transport.jms.Password" locked="false">password</parameter>
</parameter>
<parameter name="myQueueConnectionFactory1" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">file:/C:/jndidirectory</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">MyQueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
<parameter name="transport.jms.UserName" locked="false">omerk</parameter>
<parameter name="transport.jms.Password" locked="false">password</parameter>
</parameter>
</transportReceiver>
Transport Listener:
<transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender">
<parameter name="default" locked="false">
<parameter name="vender.class.loader.enabled">false</parameter>
<parameter name="java.naming.factory.initial" locked="false">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">file:/C:/jndidirectory</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">MyQueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
<parameter name="transport.jms.UserName" locked="false">omerk</parameter>
<parameter name="transport.jms.Password" locked="false">password</parameter>
</parameter>
<parameter name="myQueueConnectionFactory1" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">file:/C:/jndidirectory</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">MyQueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
<parameter name="transport.jms.UserName" locked="false">omerk</parameter>
<parameter name="transport.jms.Password" locked="false">password</parameter>
</parameter>
</transportSender>
Research So far:
I tried googling it and apparently it is showing that It is not able to figure out the Queue Manager Name. But I am unable to figure out where to add this information and how? I tried adding it on the JMS Proxy Service Level Parameters but it didn't work. So any insight would be helpful.
TroubleShooting
For Troubleshooting, when I checked the Error logs of IBM Websphere MQ. IT was giving the following error:
AMQ5534: User ID 'omerk' authentication failed
EXPLANATION:
The user ID and password supplied by the 'carbon.bootstrap.Bootstrap' program
could not be authenticated.
Solution:
For my solution the authentication was not a requirement. So I basically disabled the authentication of my queue manager by running the following commands.
ALTER AUTHINFO(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) AUTHTYPE(IDPWOS) CHCKCLNT(NONE)
REFRESH SECURITY TYPE(CONNAUTH)
IT worked for me and solved my problem.
Using a proxy-service listening on a jms queue in wso2esb-5.0.0, how do I use the activemq consumer.exclusive=true property ?
I have the following configuration in axis2.xml :
<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="default" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">failover:(tcp://V1-AMQ01:61616,tcp://V1-AMQ02:61616)?jms.nonBlockingRedelivery=true&nested.consumer.exclusive=true</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
<parameter name="transport.jms.SessionTransacted">true</parameter>
<parameter name="transport.jms.SessionAcknowledgement" locked="true">CLIENT_ACKNOWLEDGE</parameter>
<parameter name="transport.Transactionality" locked="true">local</parameter>
<parameter name="redeliveryPolicy.maximumRedeliveries" locked="true">-1</parameter>
<parameter name="redeliveryPolicy.redeliveryDelay">4000</parameter>
<parameter name="transport.jms.CacheLevel" locked="true">consumer</parameter>
<parameter name="redeliveryPolicy.initialRedeliveryDelay">4000</parameter>
<parameter name="redeliveryPolicy.maximumRedeliveryDelay">864000</parameter>
<parameter name="redeliveryPolicy.useExponentialBackOff">true</parameter>
<parameter name="redeliveryPolicy.backOffMultiplier">3</parameter>
</parameter>
</transportReceiver>
All my proxy services listening on jms queues use this configuration. The esb doesn't consume any messages. When I remove the "&nested.consumer.exclusive=true" it correctly consumes messages.
If I look at the activemq console, I see 0 consumers on my queues (normally, 1)
If I delete the queues and restart the esb, the queues are not recreated (normally they are)
The option needs to be set on the proxy service:
<proxy name="Myqueue?consumer.exclusive=true&consumer.prefetchSize=0" startOnLoad="true" transports="jms" xmlns="http://ws.apache.org/ns/synapse">
However this creates errors in the log:
2018-07-31 18:50:02,981 WARN JMSListener - Error registering a MBean with objectname ' org.apache.axis2:Type=Transport,ConnectorName=jms-listener-1065586266,Group=Services,Service=JMS_SMS_MainNotification?consumer.exclusive=true&consumer.prefetchSize=0 ' for JMX management
javax.management.MalformedObjectNameException: Invalid character '=' in value part of property
at javax.management.ObjectName.construct(ObjectName.java:618)
But as far as I understand the alternative is to use transport.jms.Destination (cf https://docs.wso2.com/display/ESB490/JMS+Transport ) but this duplicates the axis2.xml configuration ?? Is that it ?
I am having trouble setting up a JMS inbound endpoint, although I have followed all the steps in the WSO2 documentation:
I am on WSO2 esb 5.0.0 and ActiveMQ 5.13
Here is my JMS endpoint configuration:
<?xml version="1.0" encoding="UTF-8"?>
<inboundEndpoint name="TestInboundEP" protocol="jms"
suspend="false" xmlns="http://ws.apache.org/ns/synapse">
<parameters>
<parameter name="sequential">true</parameter>
<parameter name="coordination">true</parameter>
<parameter name="transport.jms.CacheLevel">3</parameter>
<parameter name="transport.jms.SessionAcknowledgement">AUTO_ACKNOWLEDGE</parameter>
<parameter name="transport.jms.SessionTransacted">false</parameter>
<parameter name="transport.jms.ConnectionFactoryType">queue</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName">myQueueConnectionFactory</parameter>
<parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
<parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory
</parameter>
<parameter name="transport.jms.UserName">admin</parameter>
<parameter name="transport.jms.Password">admin</parameter>
<parameter name="transport.jms.Destination">test</parameter>
</parameters>
</inboundEndpoint>
I keep getting the following error from my ESB console:
ERROR - JMSConnectionFactory NamingException while obtaining initial context. Failed to create InitialContext using factory specified in hash table.
javax.naming.NoInitialContextException: Failed to create InitialContext using factory specified in hash table. [Root exception is java.lang.ClassNotFoundException: class org.apache.activemq.jndi.ActiveMQInitialContextFactory
not found]
at org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContextFactoryBuilder.createInitialContextFactory(CarbonContextDataHolder.java:491)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
at javax.naming.InitialContext.init(InitialContext.java:244)
at javax.naming.InitialContext.<init>(InitialContext.java:216)
at org.wso2.carbon.inbound.endpoint.protocol.jms.factory.JMSConnectionFactory.<init>(JMSConnectionFactory.java:79)
at org.wso2.carbon.inbound.endpoint.protocol.jms.factory.CachedJMSConnectionFactory.<init>(CachedJMSConnectionFactory.java:38)
at org.wso2.carbon.inbound.endpoint.protocol.jms.JMSPollingConsumer.<init>(JMSPollingConsumer.java:62)
at org.wso2.carbon.inbound.endpoint.protocol.jms.JMSProcessor.init(JMSProcessor.java:88)
at org.apache.synapse.inbound.InboundEndpoint.init(InboundEndpoint.java:79)
at org.apache.synapse.deployers.InboundEndpointDeployer.deploySynapseArtifact(InboundEndpointDeployer.java:57)
at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.deploy(AbstractSynapseArtifactDeployer.java:194)
at org.wso2.carbon.application.deployer.synapse.SynapseAppDeployer.deployArtifacts(SynapseAppDeployer.java:131)
at org.wso2.carbon.application.deployer.internal.ApplicationManager.deployCarbonApp(ApplicationManager.java:263)
at org.wso2.carbon.application.deployer.CappAxis2Deployer.deploy(CappAxis2Deployer.java:72)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:371)
at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59)
at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.runAxisDeployment(CarbonDeploymentSchedulerTask.java:93)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Thank you very much in advance. I am new to the WSO2 community!
I am trying to configure JMS Transport with ActiveMQ in WSO2 ESB 5.0.0. I have followed the instructions in https://docs.wso2.com/display/ESB500/Configure+with+ActiveMQ with no success.
My ActiveMQ version is 5.10.
When I send a message through the JMS Endpoit I get this error:
TID: [-1234] [] [2016-10-11 17:42:15,618] ERROR {org.apache.synapse.core.axis2.Axis2Sender} - Unexpected error during sending message out {org.apache.synapse.core.axis2.Axis2Sender}
java.lang.ClassCastException: org.apache.activemq.ActiveMQConnectionFactory cannot be cast to javax.jms.XAConnectionFactory
at org.apache.axis2.transport.jms.JMSOutTransportInfo.createJMSSender(JMSOutTransportInfo.java:377)
at org.apache.axis2.transport.jms.JMSSender.sendMessage(JMSSender.java:135)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:581)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:78)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:512)
at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:382)
at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65)
at org.apache.synapse.endpoints.TemplateEndpoint.sendMessage(TemplateEndpoint.java:74)
at org.apache.synapse.endpoints.TemplateEndpoint.send(TemplateEndpoint.java:66)
at org.apache.synapse.endpoints.ResolvingEndpoint.sendMessage(ResolvingEndpoint.java:74)
at org.apache.synapse.endpoints.ResolvingEndpoint.send(ResolvingEndpoint.java:58)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:121)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:330)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:554)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:261)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
This exception is thrown just when we use XA Transaction. Otherwise it works properly.
Any help?
If you use ActiveMQ 5.10, you need to put in /lib directory to the
/repository/components/lib directory the following files:
activemq-broker-5.10.0.jar
activemq-client-5.10.0.jar
geronimo-j2ee-management_1.1_spec-1.0.1.jar
geronimo-jms_1.1_spec-1.1.1.jar
hawtbuf-1.10.jar
Not the files listed in https://docs.wso2.com/display/ESB500/Configure+with+ActiveMQ
ActiveMQ has a XA connection factory:
Specify: org.apache.activemq.ActiveMQXAConnectionFactory
As you are using Active MQ version 5.10, you have to add following jars from version 5.8 into $ESB_HOME/repository/components/lib.
activemq-broker-5.8.0.jar
activemq-client-5.8.0.jar
geronimo-jms_1.1_spec-1.1.1.jar
geronimo-j2ee-management_1.1_spec-1.0.1.jar
And uncomment JMS transport listener and JMS transport receiver in /repository/conf/axis2/axis2.xml .
<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="myTopicConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">TopicConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">topic</parameter>
</parameter>
<parameter name="myQueueConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
</parameter>
<parameter name="default" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
</parameter>
<transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender"/>
Then start the server.
You have to check your configurations according to your scenario[1].
When ESB sends to a jms endpoint sample code will be as follows:
<proxy xmlns="http://ws.apache.org/ns/synapse" name="StockQuoteProxy" transports="http">
<target>
<inSequence>
<property action="set" name="OUT_ONLY" value="true"/>
<send>
<endpoint>
<address uri="jms:/SimpleStockQuoteService?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory& java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<send/>
</outSequence>
</target>
<publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/>
</proxy>
Your error indicating about issue with a JMS sender. Specially check your configurations within axis2 and the proxy configs that you define jms endpoint.
[1] https://docs.wso2.com/display/ESB500/JMS+Usecases