JMSWMQ2008, JMSCMQ0001,compcode '2' reason '2085'

来源:互联网 发布:猎鹿人 知乎 编辑:程序博客网 时间:2024/05/16 07:28

具体堆栈信息如下:

com.ibm.msg.client.jms.DetailedInvalidDestinationException: JMSWMQ2008: 

Failed to open MQ queue 'Queue Name'. 

JMS attempted to perform an MQOPEN, but WebSphere MQ reported an error. 

Use the linked exception to determine the cause of this error. 

Check that the specified queue and queue manager are defined correctly.


Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2085' ('MQRC_UNKNOWN_OBJECT_NAME').
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:223)


错误原因: 

我们采用的是集群Queue,根据IBM官网解释,集群Q 是不能用来创建Receiver的,所以我们在调用 session.createReceiver() 的时候,就报这个错误


解决办法:

需要用到receiver的时候不用集群Q