1

ActiveMQ キューからメッセージをプルし、それを Websphere MQ キューにプッシュする単純な WSO2 ESB Axis2 JMS トランスポートがあります。

メッセージが送信されると、次のエラーが表示されます

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 接続ファクトリでクライアント モードを使用し、デフォルトの SYSTEM.DEF.SVRCONN チャネルを使用して LDAP サーバー経由でこれに接続しています。

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

乾杯スティーブ

4

1 に答える 1

1

WebSphere MQ JMS ライブラリーでは、ほとんどのトランスポート スコープ プロパティを設定できません。

したがって、JMS キューに送信する前にそれらを削除する必要があります。

の前に次のプロパティを追加する必要があります。

<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"/>

しかし、あなたはすでに解決策を見つけていると思います!:)

于 2013-03-15T03:49:41.980 に答える