JMSToolbox - can't connect to local IBM MQ queue manager - anyone got more info on config? - jms

I have a simple dev instance of IBM MQ 9.1.x. It's got the default setup on QM1 with the default user/password.
I have a JMS application that does connect already, but when I try JMSToolbox (latest 5.14.0) and I put the com.ibm.mq.allclient-9.3.0.0.jar in the jre/lib folder, I get a proper MQ properties page and I put in the same values as my JMS app, it comes back and says:
com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED').
JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED').
I feel like it's probably something simple, but I can't quite figure it out. I am fairly new to MQ.

The proper way to configure JMSToolBox to connect to IBM MQ is documented here
The specific jars needed must be setup as described here , via the"Q Managers"tab
You must not add jars to the jre\lib directory or elsewhere
As for the error you receive, its probable either a misconfigured user/password/channel in JMSToolBox or the user you are using does not have the right to access MQ
(I'm the author of JMSToolBox)

Related

JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2016' ('MQRC_GET_INHIBITED')

I am getting the following error in my log file:
2018-04-19 11:42:17,564 ERROR QueueContainer - Error com.ibm.msg.client.jms.DetailedIllegalStateException: JMSWMQ2002: Failed to get a message from destination. WebSphere MQ classes for JMS attempted to perform an MQGET; however WebSphere MQ reported an error. Use the linked exception to determine the cause of this error.
at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:496)
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:236)
at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCallSuccess(WMQMessageConsumer.java:130)
at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg(WMQConsumerShadow.java:1431)
at com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.receiveInternal(WMQSyncConsumerShadow.java:239)
at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.receive(WMQConsumerShadow.java:1135)
at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.receive(WMQMessageConsumer.java:469)
at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveInboundMessage(JmsMessageConsumerImpl.java:883)
at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receive(JmsMessageConsumerImpl.java:546)
at com.ibm.mq.jms.MQMessageConsumer.receive(MQMessageConsumer.java:258)
at com.damco.tools.proxy.mq.jms.JMSQueueReader.readNextMessage(JMSQueueReader.java:44)
at com.damco.tools.proxy.QueueContainer.runMessageLoop(QueueContainer.java:122)
at com.damco.tools.proxy.QueueContainer.run(QueueContainer.java:107)
at java.lang.Thread.run(Thread.java:767)
Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2016' ('MQRC_GET_INHIBITED').
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:223)
... 12 more
What can be the reason and resolution for this?
As previous person stated, the queue from which you would like to GET the message has GET inhibited.
However on QLOCAL level it is shown as:
DIS QL("QUEUE.A") GET(DISABLED)
so you need to ask MQ admin or if you have access to enable it.
ALTER QL(QUEUE.A) GET(ENABLED)
then try and it would work as charm!
This is what the IBM MQ documentation says about MQRC_GET_INHIBITED:
MQGET calls are currently inhibited for the queue, or for the queue to which this queue resolves.
So you have to ask your Queue Manager administrator why receiving messages from this queue is currently not enabled.

Error in IBM MQ / LoadRunner JMS

I am trying to send messages to IBM MQ through LoadRunner JMS, but getting the below exception
javax.naming.NameNotFoundException: com.ibm.mq.jms.MQConnectionFactory
at com.sun.jndi.fscontext.RefFSContext.getObjectFromBindings(RefFSContext.java:400)
at com.sun.jndi.fscontext.RefFSContext.lookupObject(RefFSContext.java:327)
at com.sun.jndi.fscontext.RefFSContext.lookup(RefFSContext.java:146)
at com.sun.jndi.fscontext.FSContext.lookup(FSContext.java:127)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.mercury.ws.jms.ConnectionManagerImpl.initialize(ConnectionManagerImpl.java:99)
at com.mercury.ws.jms.JMSSupportImpl.initialize(JMSSupportImpl.java:28)
at com.mercury.ws.jms.JMSBridge.init_jms(JMSBridge.java:154)
Maybe you are forgetting some .jars
There is an MQ JAR file called 'com.ibm.mq.allclient.jar', it can help you.
Also, here are solving this issue, read about that.

Java MQ Client 7.5 with JDK 1.8 Topic subscribtion issue[JMSWMQ0026]

I am trying to connect to a Topic in MQ Server 7.1 in java 1.6 . My Java client is running in jdk 1.8 with MQ Client 7.5 libraries. I am getting a error
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)
Checked the MQ Server there are no subscribers with my Client ID and also refreshed the MQ Server.
ERROR 2016-09-06 10:22:52,974 startSubscriber: Exception occurred:
com.ibm.msg.client.jms.DetailedJMSSecurityException: JMSWMQ0026:
Failed to subscribe to topic '/WFADO/INSTALL/SHARED_SERVICES//'
using MQSUB.
Shouldn't that be '/WFADO/INSTALL/SHARED_SERVICES/#' ? '#' (number sign) is the wild card for Pub/Sub.

Configure Weblogic Message Queue listener in Websphere

I have the below requirement to be met:
Say I have configured a JMS server, a JMS queue and a connection factory in WebLogic. Now, the message sender lies in the same WebLogic instance and able to send messages to the queue successfully. The listener part also works fine if they are in the same WebLogic instance.
Now, my requirement is, the message listener will be part of an entirely different web application deployed on WebSphere Application Server. So basically I am trying to listen to a WebLogic queue from a WebLogic server. I have tried to google the solution and found concepts like "Foreign JMS Server" and "Message Bridges" in WebLogic. What I have understood from those is that, it forwards the incoming message(in my case WebLogic queue) to a remote destination (WebSphere in my case). Then in the remote destination, I can deploy a listener configured as if it is listening to a local JMS queue. Is this understanding correct? In either case, what other options do I have? I don't have any requirement that the message needs to be directly available to my WebSphere queue as long as I am able to read the messages even from a remote message queue. so, if technically possible, the message forwarding is a bit overkill for my need. Any guidance or suggestion on this would be really helpful.
UPDATES:
I have tried the exact steps mentioned in both of those articles:
http://middlewaretimes.blogspot.in/2014/06/how-to-configure-weblogic-server-with.html
http://ibswings.blogspot.in/2008/02/integrating-mq-broker-6-with-bea.html
Since I want to use spring JMS, I have written the sender and receiver myself following this tutorial. However, now I am stuck at the following exception:
org.springframework.jms.InvalidDestinationException: JMSWMQ2008: Failed to open MQ queue 'jms/WLReceiverQueue'.; nested exception is com.ibm.msg.client.jms.DetailedInvalidDestinationException: JMSWMQ2008: Failed to open MQ queue 'jms/WLReceiverQueue'.
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.; nested exception is com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2085' ('MQRC_UNKNOWN_OBJECT_NAME').
at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:285)
at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:169)
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:496)
at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:579)
at InvoiceQueueSender.sendMesage(InvoiceQueueSender.java:23)
at InvoiceSenderServlet.service(InvoiceSenderServlet.java:17)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:243)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3432)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3402)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
Caused by: com.ibm.msg.client.jms.DetailedInvalidDestinationException: JMSWMQ2008: Failed to open MQ queue 'jms/WLReceiverQueue'.
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.
at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:503)
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:221)
at com.ibm.msg.client.wmq.internal.WMQMessageProducer.checkJmqiCallSuccess(WMQMessageProducer.java:1061)
at com.ibm.msg.client.wmq.internal.WMQMessageProducer.checkJmqiCallSuccess(WMQMessageProducer.java:1019)
at com.ibm.msg.client.wmq.internal.WMQMessageProducer.access$800(WMQMessageProducer.java:68)
at com.ibm.msg.client.wmq.internal.WMQMessageProducer$SpiIdentifiedProducerShadow.initialise(WMQMessageProducer.java:765)
at com.ibm.msg.client.wmq.internal.WMQMessageProducer.(WMQMessageProducer.java:995)
at com.ibm.msg.client.wmq.internal.WMQSession.createProducer(WMQSession.java:886)
at com.ibm.msg.client.jms.internal.JmsSessionImpl.createProducer(JmsSessionImpl.java:1232)
at com.ibm.msg.client.jms.internal.JmsQueueSessionImpl.createSender(JmsQueueSessionImpl.java:136)
at com.ibm.mq.jms.MQQueueSession.createSender(MQQueueSession.java:153)
at com.ibm.mq.jms.MQQueueSession.createProducer(MQQueueSession.java:254)
at org.springframework.jms.core.JmsTemplate.doCreateProducer(JmsTemplate.java:1142)
at org.springframework.jms.core.JmsTemplate.createProducer(JmsTemplate.java:1123)
at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:600)
at org.springframework.jms.core.JmsTemplate$4.doInJms(JmsTemplate.java:583)
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:493)
... 21 more
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:209)

WebSphere MQ integration with WebLogic - issue sending messages to foreign queue

I'm testing a WebLogic MDB (running on my local Windows dev environment - Eclipse/WebLogic 10.3.2) with WebSphere MQ 6.0.1.0 (running on a Linux server). The WebSphere MQ components have been previously configured and I have the correct .bindings file.
I have followed the instructions described here.
I have no problem consuming messages that are placed on the MQ queue. However, when I attempt to configure the MDB to put messages back to the MQ queue I get the following warning upon server start-up:
<Warning> <JMSPool> <BEA-169808> <There was an error while making the initial
connection to the JMS resource named jms/WLSenderQCF from the EJB "TestMDB"
inside application "EJB Test 2EAR". The server will attempt the connection
again later. The error was javax.jms.JMSException: MQJMS1068: failed to obtain
XAResource>
If I place a message on the queue, my MDB consumes the messages, but these exceptions are thrown when the MDB attempts to put the message to the MQ Queue:
javax.jms.JMSException: MQJMS1068: failed to obtain XAResource...
javax.transaction.xa.XAException: client connection not XA enabled...
java.lang.NullPointerException
Anyone run into this and knows what the problem is?
Thanks for any help.
One issue seems to be the version of MQ you're using. It is ancient. IBM took MQ 6 out of support quite a while ago (Sept '12! http://www-01.ibm.com/support/docview.wss?uid=swg21584325).
Things got a lot easier when IBM decided to include the extended transactional client in the product for free: http://www-01.ibm.com/support/docview.wss?uid=swg21584325
So one option might be to upgrade to a version which includes this out of the box:
7.0.1.12+
7.1.0.5+
7.5
8.0
Otherwise... look into the v6 documentation on how to enable the 'extended transactional client' for JMS assuming you paid for it.

Resources