本文介绍了MQJE001:完成代码'2',原因'2538'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

public class PtpReceiver {

public class PtpReceiver {

public static void main(String[] args) {
    // TODO Auto-generated method stub
    try {
        MQEnvironment.hostname = "192.168.120.28:1415";
        MQEnvironment.channel = "SFMS.TO.CBS";
        MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,
                MQC.TRANSPORT_MQSERIES);
        System.out.println("Q manager");
        MQQueueManager qMgr = new MQQueueManager("GSCBBRQM");
        System.out.println("Q manager11");

    }

    catch (MQException ex) {
        System.out.println(ex.completionCode+ ex.reasonCode);
        }
}

}

我收到以下错误:

MQJE001:完成代码'2',原因'2538'。

MQJE001: Completion Code '2', Reason '2538'.

任何人都可以帮我解决这个错误

Can any one help me for solve this error

推荐答案

我认为有必要像这样定义你的连接模式:

I think it is necessary to define your connection mode like this:

jmsFactory = JmsFactoryFactory.getInstance(WMQConstants.WMQ_PROVIDER);
jcf = jmsFactory.createConnectionFactory();

// Set the properties
jcf.setStringProperty(WMQConstants.WMQ_HOST_NAME, hostName);
jcf.setIntProperty(WMQConstants.WMQ_PORT, port);
jcf.setIntProperty(WMQConstants.WMQ_CONNECTION_MODE, WMQConstants.WMQ_CM_CLIENT);
jcf.setStringProperty(WMQConstants.WMQ_CHANNEL, channel);

connection = jcf.createConnection();

我希望它有效。
如需更多信息,请参阅。

这篇关于MQJE001:完成代码'2',原因'2538'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 06:40