我正在尝试连接到java 1.6中的MQ Server 7.1中的主题。我的Java客户端在带有MQ Client 7.5库的jdk 1.8中运行。我收到了错误
TopicHandler
The Q name is :/WFADO/INSTALL/SHARED_SERVICES/*/*
SSL is enabled for Topic connection
MQ MNRG FLAG: false
Connection establisted with topic manager
Got topic manager session
Got topic object
Starting the session
Starting subscriber...
with topic:topic:///WFADO/INSTALL/SHARED_SERVICES/*/* and name:/WFADO/INSTALL/SHARED_SERVICES/*/*
com.ibm.msg.client.jms.DetailedJMSSecurityException: JMSWMQ0026: Failed to subscribe to topic '/WFADO/INSTALL/SHARED_SERVICES/*/*' using MQSUB.
There may have been a problem creating the subscription due to it being used by another message consumer.
Make sure any message consumers using this subscription are closed before trying to create a new subscription under the same name. Please see the linked exception for more information.
at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:521)
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:221)
at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCallSuccess(WMQMessageConsumer.java:129)
at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.initialize(WMQConsumerShadow.java:871)
at com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.initialize(WMQSyncConsumerShadow.java:139)
at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.<init>(WMQMessageConsumer.java:296)
at com.ibm.msg.client.wmq.internal.WMQSession.createDurableSubscriber(WMQSession.java:825)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.createDurableSubscriber(JmsSessionImpl.java:980)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.createDurableSubscriber(JmsSessionImpl.java:1019)
at com.ibm.mq.jms.MQSession.createDurableSubscriber(MQSession.java:531)
at MQTopicHandler.startSubscriber(MQTopicHandler.java:248)
at MQTopicHandler.<init>(MQTopicHandler.java:176)
at MQTopicHandler.main(MQTopicHandler.java:396)
Caused by: 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:209)
... 11 more
com.ibm.msg.client.jms.DetailedJMSSecurityException: JMSWMQ0026: Failed to subscribe to topic '/WFADO/INSTALL/SHARED_SERVICES/*/*' using MQSUB.
There may have been a problem creating the subscription due to it being used by another message consumer.
Make sure any message consumers using this subscription are closed before trying to create a new subscription under the same name. Please see the linked exception for more information.
at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:521)
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:221)
at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCallSuccess(WMQMessageConsumer.java:129)
at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.initialize(WMQConsumerShadow.java:871)
at com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.initialize(WMQSyncConsumerShadow.java:139)
at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.<init>(WMQMessageConsumer.java:296)
at com.ibm.msg.client.wmq.internal.WMQSession.createDurableSubscriber(WMQSession.java:825)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.createDurableSubscriber(JmsSessionImpl.java:980)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.createDurableSubscriber(JmsSessionImpl.java:1019)
at com.ibm.mq.jms.MQSession.createDurableSubscriber(MQSession.java:531)
at MQTopicHandler.startSubscriber(MQTopicHandler.java:248)
at MQTopicHandler.<init>(MQTopicHandler.java:176)
at MQTopicHandler.main(MQTopicHandler.java:396)
Caused by: 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:209)
... 11 more
Exception Msg: JMSWMQ0026: Failed to subscribe to topic '/WFADO/INSTALL/SHARED_SERVICES/*/*' using MQSUB.
com.ibm.msg.client.jms.DetailedJMSSecurityException: JMSWMQ0026: Failed to subscribe to topic '/WFADO/INSTALL/SHARED_SERVICES/*/*' using MQSUB.
There may have been a problem creating the subscription due to it being used by another message consumer.
Make sure any message consumers using this subscription are closed before trying to create a new subscription under the same name. Please see the linked exception for more information.
at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:521)
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:221)
at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCallSuccess(WMQMessageConsumer.java:129)
at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.initialize(WMQConsumerShadow.java:871)
at com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.initialize(WMQSyncConsumerShadow.java:139)
at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.<init>(WMQMessageConsumer.java:296)
at com.ibm.msg.client.wmq.internal.WMQSession.createDurableSubscriber(WMQSession.java:825)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.createDurableSubscriber(JmsSessionImpl.java:980)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.createDurableSubscriber(JmsSessionImpl.java:1019)
at com.ibm.mq.jms.MQSession.createDurableSubscriber(MQSession.java:531)
at MQTopicHandler.startSubscriber(MQTopicHandler.java:248)
at MQTopicHandler.<init>(MQTopicHandler.java:176)
at MQTopicHandler.main(MQTopicHandler.java:396)
Caused by: 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:209)
... 11 more
JMS Error code: JMSWMQ0026
JMS Explanation: There may have been a problem creating the subscription due to it being used by another message consumer.
JMS Explanation: Make sure any message consumers using this subscription are closed before trying to create a new subscription under the same name. Please see the linked exception for more information.
Exception Msg: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED').
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:209)
at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCallSuccess(WMQMessageConsumer.java:129)
at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.initialize(WMQConsumerShadow.java:871)
at com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.initialize(WMQSyncConsumerShadow.java:139)
at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.<init>(WMQMessageConsumer.java:296)
at com.ibm.msg.client.wmq.internal.WMQSession.createDurableSubscriber(WMQSession.java:825)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.createDurableSubscriber(JmsSessionImpl.java:980)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.createDurableSubscriber(JmsSessionImpl.java:1019)
at com.ibm.mq.jms.MQSession.createDurableSubscriber(MQSession.java:531)
at MQTopicHandler.startSubscriber(MQTopicHandler.java:248)
at MQTopicHandler.<init>(MQTopicHandler.java:176)
at MQTopicHandler.main(MQTopicHandler.java:396)
WMQ Completion code: 2
WMQ Reason code: 2035
Exception in thread "main" java.lang.Exception: JMSWMQ0026: Failed to subscribe to topic '/WFADO/INSTALL/SHARED_SERVICES/*/*' using MQSUB.
at MQTopicHandler.<init>(MQTopicHandler.java:230)
at MQTopicHandler.main(MQTopicHandler.java:396)
检查MQ服务器没有具有我的客户端ID的订户,并且还刷新了MQ服务器。
答案 0 :(得分:0)
ERROR 2016-09-06 10:22:52,974 startSubscriber:发生异常: com.ibm.msg.client.jms.DetailedJMSSecurityException:JMSWMQ0026: 无法订阅主题'/ WFADO / INSTALL / SHARED_SERVICES / / ' 使用MQSUB。
不应该是'/ WFADO / INSTALL / SHARED_SERVICES /#'吗? '#'(数字符号)是Pub / Sub的外卡。