In my GetJMSMessage, I used this:
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();
This works when I run my class as a standalone app. However, when I deployed my project in Weblogic 10, it gave a JMSException error. IBM MQ is deployed remotely and I have no access to it.
The error stacktrace is javax.jms.JMSException:
MQJMS2005: failed to create MQQueueManager for 'hostname:queuemanager'
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:644)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2567)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1912)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:161)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:202)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:121)
at com.ibm.mq.jms.MQQueueConnectionFactory.createConnection(MQQueueConnectionFactory.java:1038)
What causes this error and how can I fix this? and why does this error arises only when I deployed the project in my local server?