• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMSException: MQJMS2005

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I get the following error while compiling my standalone java code to write data into a MQueue.
Find below the Error, followed by the Code.
What is the problem in this. Any suggestions please let me know. Thanks


Error:--------------------------------
Exception in thread "main" javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for '172.26.26.14:B1Q1'
at com.ibm.mq.jms.services.ConfigEnvironment.newExcep tion(ConfigEnvironment.java:546)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection. java:1450)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnec tion.java:960)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueCon nection.java:159)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueCon nection.java:77)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueu eConnection(MQQueueConnectionFactory.java:142)
at Inbound.main(Inbound.java:69)

--------------------------------

Code:--------------------------------
MQQueueConnectionFactory qcf = new MQQueueConnectionFactory();
QueueConnection connection=null;
QueueSession session=null;
Queue orderQueue=null;
QueueSender qs=null;
qcf.setQueueManager("B1Q1");
qcf.setHostName("172.26.26.14");
qcf.setPort(23);
qcf.setChannel("SYSTEM.DEF.SVRCONN");
qcf.setTransportType(0);
connection = (QueueConnection) qcf.createQueueConnection();
session = (QueueSession) connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
orderQueue = session.createQueue("PBS.OFT.NEMKONTO.AFSENDELSE") ;
qs = session.createSender(orderQueue);

--------------------------------
 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi sathish,

Before executing the MQ program, can you just check with the host id.

just ping the host name from DOS prompt --- ping 172.26.26.14

then check with the Queue manager start or stop, then check with the port

number . The Default port number of MQ 1414.

Then check whethere JMS Server Properties section Initial state attribute is set to START.

Just check at your end ,Let me know the clarification

Regards
k.krishnamoorthy
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic