I'm using wso2esb4.7.0 and wso2mb-2.2.0. I wish to create jms proxy service using wso2mb. For this i have configured the wso2mb as well as wso2esb like :
Wso2esb configuration :
(changes in jndi.properties)
# register some connection factories
# connectionfactory.[jndiname] = [ConnectionURL]
connectionfactory.QueueConnectionFactory = amqp://admin:admin#clientID/carbon?brokerlist='tcp://localhost:5673'
connectionfactory.TopicConnectionFactory = amqp://admin:admin#clientID/carbon?brokerlist='tcp://localhost:5673'
# register some queues in JNDI using the form
# queue.[jndiName] = [physicalName]
queue.MyQueue = MyQueue
changes in axis2.xml :
uncomment following code :
<transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender"/>
<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="myTopicConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">repository/conf/jndi.properties</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.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">repository/conf/jndi.properties</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.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">repository/conf/jndi.properties</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">ConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
</parameter>
</transportReceiver>
also copied andes-client-*.jar and geronimo-jms_1.1_spec-*.jar from $MB_HOME/client-lib to $ESB_HOME/repository/components/lib
re-started servers.Till it's working fine.
Now wish to create a service with jms port. it is creating a service but immediately it goes to faulty service and esb logs it showing error like :
ERROR - JMSListener Unexpected error when configuring service SampleJMS for the JMS transport. It will be disabled for this transport and marked as faulty.
java.lang.NullPointerException
at org.apache.axis2.transport.jms.JMSListener.getConnectionFactory(JMSListener.java:132)
at org.apache.axis2.transport.jms.JMSEndpoint.loadConfiguration(JMSEndpoint.java:193)
at org.apache.axis2.transport.base.AbstractTransportListenerEx.startListeningForService(AbstractTransportListenerEx.java:153)
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.start(AxisServiceTracker.java:188)
at org.apache.axis2.transport.base.AbstractTransportListener.start(AbstractTransportListener.java:178)
at org.apache.axis2.transport.base.AbstractTransportListenerEx.start(AbstractTransportListenerEx.java:83)
also while restarting it showing error like :
ERROR - BaseUtils JNDI lookup of name ConnectionFactory returned a org.wso2.andes.client.AMQQueue while a interface javax.jms.ConnectionFactory was expected
[2015-01-20 10:22:27,709] ERROR - ListenerManager Couldn't initialize the jmstransport listener
org.apache.axis2.transport.base.BaseTransportException: JNDI lookup of name ConnectionFactory returned a org.wso2.andes.client.AMQQueue while a interface javax.jms.ConnectionFactory was expected
My proxy configuration is :
<target>
<inSequence>
<property name="Action"
value="urn:placeOrder"
scope="default"
type="STRING"/>
<log level="full"/>
<send>
<endpoint>
<address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<drop/>
</outSequence>
Why so? is their any problem with jms configuration? Please guide me.
in jndi.properties, you've defined :
QueueConnectionFactory
TopicConnectionFactory
and in axis.xml, you use :
QueueConnectionFactory
TopicConnectionFactory
AND, in the default part, a "ConnectionFactory"
I don't use WSO2MB by I wonder if this would not be your problem
Related
I have a simple vfs based proxy service. I want to poll file "DiscardedContracts.csv" and I want to add time with file name and move it to Out directory.
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="ContractsDiscardedFileReader"
startOnLoad="true"
statistics="disable"
trace="disable"
transports="vfs">
<target>
<inSequence>
<property expression="fn:concat('DiscardedContracts', get-property('SYSTEM_DATE', 'yyMMddHHmmss'), '.csv')"
name="transport.vfs.ReplyFileName"/>
<log separator="==-------Going to move discarded contract file in out directory---------=="/>
<log level="custom" separator="==-------File--------==">
<property expression="fn:concat('DiscardedContracts', get-property('SYSTEM_DATE', 'yyMMddHHmmss'), '.csv')"
name="transport.vfs.ReplyFileName"/>
</log>
<property name="OUT_ONLY" scope="default" type="STRING" value="true"/>
<send>
<endpoint name="FileEpr">
<address uri="vfs:file:///opt/file/contracts/Out/"/>
</endpoint>
</send>
</inSequence>
<faultSequence>
<sequence key="DeliveriesFileProcessingFaultSequence"/>
</faultSequence>
</target>
<parameter name="transport.vfs.ContentType">text/plain</parameter>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.vfs.CreateFolder">true</parameter>
<parameter name="transport.vfs.MoveAfterFailure">vfs:file:///opt/file/contracts/Fail</parameter>
<parameter name="sequential">true</parameter>
<parameter name="transport.vfs.LockReleaseSameNode">false</parameter>
<parameter name="transport.vfs.Build">false</parameter>
<parameter name="transport.vfs.MoveAfterProcess">vfs:file:///opt/file/contracts/Out/</parameter>
<parameter name="coordination">true</parameter>
<parameter name="transport.vfs.Streaming">true</parameter>
<parameter name="transport.PollInterval">30</parameter>
<parameter name="transport.vfs.FileURI">vfs:file:///opt/file/mysql</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
<parameter name="transport.vfs.AutoLockRelease">false</parameter>
<parameter name="transport.vfs.FileSortAttribute">lastmodifiedtimestamp</parameter>
<parameter name="transport.vfs.FileSortAscending">true</parameter>
<parameter name="transport.vfs.DistributedLock">false</parameter>
<parameter name="transport.vfs.FileNamePattern">.*.csv</parameter>
<parameter name="transport.vfs.Locking">disable</parameter>
<description/>
</proxy>
But Problem is I am able to concat datetime with file name but file is not moving to Out directory properly. It create a response.xml Which contains my data. I don't know how file name and extension is changing. Need help, Thanks.
I believe this is because you have not set transport.vfs.ReplyFileName. (You have only logged it.) Its default value is response.xml.
If you take transport.vfs.ReplyFileName property out of the log mediator, it should work.
Ref: https://docs.wso2.com/display/ESB500/VFS+Transport
Update: Set scope="transport" to the property like below.
<property expression="fn:concat('DiscardedContracts', get-property('SYSTEM_DATE', 'yyMMddHHmmss'), '.csv')"
scope="transport"
name="transport.vfs.ReplyFileName"/>
Defined a proxy-service and need to access service parameters from registry. The below syntax is not working.
<parameter name="transport.vfs.FileURI">"conf:/repository/FileLocation"</parameter>
<parameter name="transport.vfs.MoveAfterFailure">"conf:/repository/FileMoveAfterFailure"</parameter>
<parameter name="transport.vfs.FileNamePattern">"conf:/repository/FilePattern"</parameter>
<parameter name="transport.vfs.MoveAfterProcess">"conf:/repository/FileMoveAfterProcess"</parameter>
How to access registry values under /_system/config/repository to use in proxy service parameters?
As far as I know you cannot, the only option is to create a "file" inbound endpoint
<inboundEndpoint name="test_Inbound" protocol="file" sequence="test_Process" suspend="false" xmlns="http://ws.apache.org/ns/synapse">
<parameters>
<parameter name="interval">5000</parameter>
<parameter name="sequential">true</parameter>
<parameter name="coordination">true</parameter>
<parameter name="transport.vfs.ContentType">text/plain</parameter>
<parameter name="transport.vfs.LockReleaseSameNode">false</parameter>
<parameter name="transport.vfs.AutoLockRelease">false</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter key="conf:/repository/FileLocation" name="transport.vfs.FileURI"/>
<parameter key="conf:/repository/FileMoveAfterFailure" name="transport.vfs.MoveAfterFailure"/>
<parameter name="transport.vfs.DistributedLock">false</parameter>
<parameter key="conf:/repository/FilePattern" name="transport.vfs.FileNamePattern"/>
<parameter key="conf:/repository/FileMoveAfterProcess" name="transport.vfs.MoveAfterProcess"/>
<parameter name="transport.vfs.Locking">disable</parameter>
<parameter name="transport.vfs.CreateFolder">true</parameter>
<parameter name="transport.vfs.Streaming">false</parameter>
<parameter name="transport.vfs.Build">false</parameter>
</parameters>
</inboundEndpoint>
Then you have to do your processing in a sequence (test_Process), and of course adapt to your parameters (ContentType, interval, sequential or not....)
I never tried for transport.vfs.FileNamePattern but for the other I'm sure it's working as I'm using it.
I was wondering how to configure a JMS transport to work with IBM MessageSight, similar to: http://docs.wso2.org/display/ESB460/Configure+with+ActiveMQ
Right now, I have the following in axis2.xml:
<transportReceiver name="ibmMsgSightJMS" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="myTopicConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.ibm.ima.jms.ImaJmsFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">tcp://192.168.154.128:1883</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">com.ibm.ima.jms.ImaJmsFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">tcp://192.168.154.128:1883</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">com.ibm.ima.jms.ImaJmsFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">tcp://192.168.154.128:1883</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
</parameter>
</transportReceiver>
And I have something like this in an ESB proxy service:
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="esbProcessMqttJMSPS" statistics="disable" trace="disable" transports="ibmMsgSightJMS">
<parameter name="transport.jms.ConcurrentConsumers">1</parameter>
<parameter name="transport.jms.ConnectionFactory">myTopicConnectionFactory</parameter>
<parameter name="transport.jms.DestinationType">B</parameter>
<parameter name="transport.jms.Destination">B</parameter>
</proxy>
When I startup the ESB server, I get the following error: Cannot acquire JNDI context, JMS Connection factory : TopicConnectionFactory or default destination : null for JMS CF
Any help would be greatly appreciated. Thanks!
Okay so I figured this out.
The jms config in axis2.xml should be:
<transportReceiver name="ibmMsgSightJMS" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="myTopicConnectionFactory">
<parameter name="java.naming.factory.initial" locked="false">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">file:/C:/path/to/wso2/repository/conf/jndi</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">connFactory1</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">topic</parameter>
</parameter>
<parameter name="myQueueConnectionFactory">
<parameter name="java.naming.factory.initial">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url">file:/C:/path/to/wso2/repository/conf/jndi</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName">connFactory1</parameter>
<parameter name="transport.jms.ConnectionFactoryType">queue</parameter>
</parameter>
<parameter name="default">
<parameter name="java.naming.factory.initial">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url">file:/C:/path/to/wso2/repository/conf/jndi</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName">connFactory1</parameter>
<parameter name="transport.jms.ConnectionFactoryType">topic</parameter>
</parameter>
</transportReceiver>
And I have a jndi properties file named .bindings with the following:
connFactory1/ClassName=com.ibm.ima.jms.impl.ImaConnectionFactory
connFactory1/FactoryName=com.ibm.ima.jms.impl.ImaConnectionFactory
connFactory1/RefAddr/0/Encoding=String
connFactory1/RefAddr/0/Type=Port
connFactory1/RefAddr/0/Content=16102
connFactory1/RefAddr/1/Encoding=String
connFactory1/RefAddr/1/Type=Server
connFactory1/RefAddr/1/Content=192.168.154.128
connFactory1/RefAddr/2/Encoding=String
connFactory1/RefAddr/2/Content=common
connFactory1/RefAddr/2/Type=ObjectType
RequestTopic/ClassName=com.ibm.ima.jms.impl.ImaTopic
RequestTopic/FactoryName=com.ibm.ima.jms.impl.ImaTopic
RequestTopic/RefAddr/0/Encoding=String
RequestTopic/RefAddr/0/Type=Name
RequestTopic/RefAddr/0/Content=testRequestTopic
ResponseTopic/ClassName=com.ibm.ima.jms.impl.ImaTopic
ResponseTopic/FactoryName=com.ibm.ima.jms.impl.ImaTopic
ResponseTopic/RefAddr/0/Encoding=String
ResponseTopic/RefAddr/0/Type=Name
ResponseTopic/RefAddr/0/Content=testResponseTopic
Also, don't forget to put the ImaJmsClient.jar inside components/lib.
I am still having issues where every service is creating topics/queues, and because they are not defined in .bindings, the server is puking. I have worked around this by removing the jms transport protocol on every data service and jar service.
I have a service listening on a queue that I want to forward the message to a totally different broker. Is this possible in WSO2 ESB and if so how would this configuration be done? I tried specifying the endpoint using the other broker's transport url but that did not work...
Here's the WSO2 ESB proxy service configuration I've used to pick from a JMS queue and post to another queue (on an ActiveMQ JMS provider):
<proxy xmlns="http://ws.apache.org/ns/synapse" name="JMS_to_JMS_proxy_service" transports="jms" statistics="disable" trace="disable" startOnLoad="true">
<target>
<inSequence>
<log level="full" separator="," />
<property name="OUT_ONLY" value="true" scope="default" type="STRING" />
<send>
<endpoint>
<address uri="jms:/Destination_Queue_Name?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://Your_Host:61616&transport.jms.DestinationType=queue" trace="disable">
<timeout>
<duration>30000</duration>
<responseAction>fault</responseAction>
</timeout>
<suspendOnFailure>
<initialDuration>0</initialDuration>
<progressionFactor>1.0</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
</address>
</endpoint>
</send>
</inSequence>
</target>
<parameter name="transport.jms.ContentType">
<rules>
<jmsProperty>contentType</jmsProperty>
<default>text/plain; charset=ISO-8859-1</default>
</rules>
</parameter>
<parameter name="transport.jms.ConnectionFactory">myQueueConnectionFactory</parameter>
<parameter name="transport.jms.DestinationType">queue</parameter>
<parameter name="transport.jms.Destination">Source_Queue_Name</parameter>
</proxy>
Don't forget to enable the JMS Transport Sender under Configure -> Transports menu. Also the myQueueConnectionFactory refers to a parameter set under Configure -> Transports -> JMS Transport Listener.
Update: Newer versions of WSO2 ESB will not have a GUI option to enable/disable transports. To do so, you will have to modify the {ESB_ROOT_DIRECTORY}/repository/conf/axis2/axis2.xml file and un-comment the JMSListener/JMSSender that corresponds to your environment (ActiveMQ, WSO2 MB, etc.)
I have a simple WSO2 ESB Axis2 JMS transport pulling a message from an ActiveMQ queue and pushing it to a Websphere MQ Queue.
When the message is sent I get the following error
com.ibm.msg.client.jms.DetailedMessageFormatException: JMSCC0050: The property name 'JMS_DESTINATION' is reserved and cannot be set
I'm not setting any properties explicitly but I wonder if this is the way the WSO2 ESB Axis2 JMS transport sends a message to Websphere MQ?
This works fine the other way Websphere MQ to ActiveMQ.
I am using Client Mode on the JNDI Websphere MQ connection factory and connecting to this via an LDAP server also using the default SYSTEM.DEF.SVRCONN channel.
Could it be a permissions issue in Websphere MQ?
I ran ALTER QMGR CHLAUTH(DISABLED) to rule out any permissions issues (I hoped).
Proxy Service
<proxy xmlns="http://ws.apache.org/ns/synapse" name="ACTIVETOIBM" transports="jms" statistics="enable" trace="enable" startOnLoad="true">
<target>
<inSequence>
<log level="full" separator=","/>
<property name="OUT_ONLY" value="true" scope="default" type="STRING"/>
<send>
<endpoint>
<address uri="jms:/cn=QUEUE.OUT?transport.jms.ConnectionFactory=ibmMQQueueConnectionFactory&transport.jms.Destination=cn=QUEUE.OUT">
<markForSuspension>
<retryDelay>5</retryDelay>
</markForSuspension>
</address>
</endpoint>
</send>
</inSequence>
<outSequence/>
<faultSequence>
<log level="full" category="ERROR" separator=","/>
</faultSequence>
</target>
<parameter name="transport.jms.ConnectionFactory">activeMQQueueConnectionFactory</parameter>
<parameter name="transport.jms.Destination">QUEUE.IN</parameter>
<description></description>
</proxy>
axis2 jms transportReceiver config
<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="activeMQQueueConnectionFactory" 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="ibmMQQueueConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.sun.jndi.ldap.LdapCtxFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">ldap://localhost:7777/dc=example,dc=com</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">cn=ConnectionFactoryLdap</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
</parameter>
</transportReceiver>
axis2 jms transportSender config
<transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender">
<parameter name="activeMQQueueConnectionFactory" 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="ibmMQQueueConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.sun.jndi.ldap.LdapCtxFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">ldap://localhost:7777/dc=example,dc=com</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">cn=ConnectionFactoryLdapCM</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
</parameter>
</transportSender>
Full Stack Trace
com.ibm.msg.client.jms.DetailedMessageFormatException: JMSCC0050: The property name 'JMS_DESTINATION' is reserved and cannot be set.
The supplied property name begins with the JMS prefix, but is not one of the supported, settable properties.
Check the property name and correct errors.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:319)
at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:233)
at com.ibm.msg.client.jms.internal.JmsErrorUtils.createException(JmsErrorUtils.java:109)
at com.ibm.msg.client.jms.internal.JmsMessageImpl.checkSettablePropertyName(JmsMessageImpl.java:2125)
at com.ibm.msg.client.jms.internal.JmsMessageImpl.setStringProperty(JmsMessageImpl.java:1560)
at com.ibm.jms.JMSMessage.setStringProperty(JMSMessage.java:1496)
at org.apache.axis2.transport.jms.JMSUtils.setTransportHeaders(JMSUtils.java:278)
at org.apache.axis2.transport.jms.JMSSender.createJMSMessage(JMSSender.java:441)
at org.apache.axis2.transport.jms.JMSSender.sendOverJMS(JMSSender.java:172)
at org.apache.axis2.transport.jms.JMSSender.sendMessage(JMSSender.java:154)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine$TransportNonBlockingInvocationWorker.run(AxisEngine.java:626)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
[2013-03-15 10:25:35,306] ERROR - AsyncCallback Error creating a JMS message from the message context
org.apache.axis2.AxisFault: Error creating a JMS message from the message context
at org.apache.axis2.transport.base.AbstractTransportSender.handleException(AbstractTransportSender.java:226)
at org.apache.axis2.transport.jms.JMSSender.sendOverJMS(JMSSender.java:174)
at org.apache.axis2.transport.jms.JMSSender.sendMessage(JMSSender.java:154)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine$TransportNonBlockingInvocationWorker.run(AxisEngine.java:626)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: com.ibm.msg.client.jms.DetailedMessageFormatException: JMSCC0050: The property name 'JMS_DESTINATION' is reserved and cannot be set.
The supplied property name begins with the JMS prefix, but is not one of the supported, settable properties.
Check the property name and correct errors.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:319)
at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:233)
at com.ibm.msg.client.jms.internal.JmsErrorUtils.createException(JmsErrorUtils.java:109)
at com.ibm.msg.client.jms.internal.JmsMessageImpl.checkSettablePropertyName(JmsMessageImpl.java:2125)
at com.ibm.msg.client.jms.internal.JmsMessageImpl.setStringProperty(JmsMessageImpl.java:1560)
at com.ibm.jms.JMSMessage.setStringProperty(JMSMessage.java:1496)
at org.apache.axis2.transport.jms.JMSUtils.setTransportHeaders(JMSUtils.java:278)
at org.apache.axis2.transport.jms.JMSSender.createJMSMessage(JMSSender.java:441)
at org.apache.axis2.transport.jms.JMSSender.sendOverJMS(JMSSender.java:172)
... 6 more
[2013-03-15 10:25:35,310] WARN - AsyncCallback Executing fault handler due to exception encountered
[2013-03-15 10:25:35,311] WARN - FaultHandler ERROR_CODE : 0
[2013-03-15 10:25:35,311] WARN - FaultHandler ERROR_MESSAGE : Error creating a JMS message from the message context
[2013-03-15 10:25:35,311] WARN - FaultHandler ERROR_DETAIL : org.apache.synapse.SynapseException: Error creating a JMS message from the message context
at org.apache.synapse.core.axis2.AsyncCallback.onError(AsyncCallback.java:67)
at org.apache.axis2.engine.AxisEngine$TransportNonBlockingInvocationWorker.run(AxisEngine.java:643)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.axis2.AxisFault: Error creating a JMS message from the message context
at org.apache.axis2.transport.base.AbstractTransportSender.handleException(AbstractTransportSender.java:226)
at org.apache.axis2.transport.jms.JMSSender.sendOverJMS(JMSSender.java:174)
at org.apache.axis2.transport.jms.JMSSender.sendMessage(JMSSender.java:154)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine$TransportNonBlockingInvocationWorker.run(AxisEngine.java:626)
... 3 more
Caused by: com.ibm.msg.client.jms.DetailedMessageFormatException: JMSCC0050: The property name 'JMS_DESTINATION' is reserved and cannot be set.
The supplied property name begins with the JMS prefix, but is not one of the supported, settable properties.
Check the property name and correct errors.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:319)
at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:233)
at com.ibm.msg.client.jms.internal.JmsErrorUtils.createException(JmsErrorUtils.java:109)
at com.ibm.msg.client.jms.internal.JmsMessageImpl.checkSettablePropertyName(JmsMessageImpl.java:2125)
at com.ibm.msg.client.jms.internal.JmsMessageImpl.setStringProperty(JmsMessageImpl.java:1560)
at com.ibm.jms.JMSMessage.setStringProperty(JMSMessage.java:1496)
at org.apache.axis2.transport.jms.JMSUtils.setTransportHeaders(JMSUtils.java:278)
at org.apache.axis2.transport.jms.JMSSender.createJMSMessage(JMSSender.java:441)
at org.apache.axis2.transport.jms.JMSSender.sendOverJMS(JMSSender.java:172)
... 6 more
[2013-03-15 10:25:35,313] WARN - FaultHandler ERROR_EXCEPTION : org.apache.synapse.SynapseException: Error creating a JMS message from the message context
Cheers
Steve
WebSphere MQ JMS library does not allow setting most of transport scope properties.
Therefore you have to remove those before sending to JMS queue.
We need to add following properties before .
<property name="JMS_DESTINATION" scope="transport" action="remove"/>
<property name="JMS_REDELIVERED" scope="transport" action="remove" />
<property name="JMS_TYPE" scope="transport" action="remove" />
<property name="Accept-Encoding" scope="transport" action="remove"/>
<property name="Content-Length" scope="transport" action="remove"/>
<property name="Content-Type" scope="transport" action="remove"/>
<property name="User-Agent" scope="transport" action="remove"/>
<property name="Transfer-Encoding" scope="transport" action="remove"/>
<property name="X-Forwarded-For" scope="transport" action="remove"/>
<property name="X-Forwarded-Host" scope="transport" action="remove"/>
<property name="X-Forwarded-Server" scope="transport" action="remove"/>
But I guess you have already found the solution! :)