WSO2 EI 6.3.0无法使用JMS与IBM Websphere MQ v8连接

时间:2019-03-14 15:53:30

标签: wso2 jms websphere wso2esb ibm-mq

我正在尝试通过JMS Transport将WSO2 Enterprise Integrator与IBM Websphere MQ v 8.0.0.5连接起来。目的是能够使用JMS协议通过WSO2 Enterprise Integrator在IBM Websphere MQ中的队列上接收/发布消息。

链接:

我遵循了WSO2官方文档提供的link。我完全遵循了所有步骤,但是当我部署JMS侦听器代理时,它变成了有问题的服务,并且在控制台上向我显示了以下错误:

错误堆栈跟踪:

onUpdate = (event) => {
    const { target: { name, value } } = event
    console.log(value);

    const newData = {};
    newData[name] = value;
    this.setState(newData);
}

文档中提到的代理服务代码:

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)

Axis2文件配置: 以下是用于传输接收器和传输侦听器的axis2配置。

运输接收器:

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

传输监听器:

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

到目前为止的研究:

我尝试谷歌搜索它,显然它表明它无法弄清队列管理器名称。但是我无法弄清楚在何处添加此信息以及如何添加?我尝试将其添加到“ JMS代理服务级别参数”上,但无法正常工作。因此,任何见解都会有所帮助。

1 个答案:

答案 0 :(得分:0)

故障排除

对于故障诊断,当我检查IBM Websphere MQ的错误日志时。 IT出现以下错误:

AMQ5534: User ID 'omerk' authentication failed

EXPLANATION:
The user ID and password supplied by the 'carbon.bootstrap.Bootstrap' program
could not be authenticated. 

解决方案:

对于我的解决方案,身份验证不是必需的。因此,我基本上通过运行以下命令来禁用队列管理器的身份验证。

ALTER AUTHINFO(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) AUTHTYPE(IDPWOS) CHCKCLNT(NONE)

REFRESH SECURITY TYPE(CONNAUTH)

IT为我工作,解决了我的问题。