我有一个简单的 WSO2 ESB Axis2 JMS 传输从 ActiveMQ 队列中提取消息并将其推送到 Websphere MQ 队列。
发送消息时,我收到以下错误
com.ibm.msg.client.jms.DetailedMessageFormatException: JMSCC0050: The property name 'JMS_DESTINATION' is reserved and cannot be set
我没有明确设置任何属性,但我想知道这是否是 WSO2 ESB Axis2 JMS 传输向 Websphere MQ 发送消息的方式?
这与 Websphere MQ 到 ActiveMQ 的另一种方式效果很好。
我在 JNDI Websphere MQ 连接工厂上使用客户端模式,并通过 LDAP 服务器连接到它,也使用默认的 SYSTEM.DEF.SVRCONN 通道。
这可能是 Websphere MQ 中的权限问题吗?
我运行了 ALTER QMGR CHLAUTH(DISABLED) 以排除任何权限问题(我希望如此)。
代理服务
<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 配置
<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 配置
<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>
全栈跟踪
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
干杯史蒂夫