title: MQJMS2005 exception failed to create MQQueueManager
body: <p>In my GetJMSMessage, I used this:</p>
  
  <pre><code>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();
  </code></pre>
  
  <p>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.</p>
  
  <p>The error stacktrace is javax.jms.JMSException: </p>
  
  <pre><code>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.&lt;init&gt;(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)
  </code></pre>
  
  <p>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?</p>