Executing the below code which attempts to connect WebSphere MQ QueueManager using client mode I got MQJMS2005 exception
MQQueueConnectionFactory cf = new MQQueueConnectionFactory();
cf.setPort(port);
cf.setHostName(host);
cf.setChannel(channel);
cf.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
cf.setQueueManager(queuemanager);
conn = (MQQueueConnection)cf.createQueueConnection();
I use com.ibm.mq.jar , com.ibm.mqjms.jar, dhbcore.jar, jmscommon.jar and j2ee.jar.
I assume this might be something related to permission, because the same code can work fine on another machine when connecting to another host/port/channel/queue manager/queue
The stack trace is as follows:
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'host:queuemanager'
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:644)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2591)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1936)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:161)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:206)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:126)
at MQTest.init(MQTest.java:51)
How can I troubleshoot this so that I can make run the code sucessfully?