System.out.println("Context="+ctx);
factory = (ConnectionFactory)ctx.lookup("MyQueueConnFactory");
System.out.println("Factory="+factory);
connection = factory.createConnection();
System.out.println("Connection="+connection);
Context=javax.naming.directory.InitialDirContext@b46d8b0
Factory=com.ibm.mq.jms.MQQueueConnectionFactory@14fda7f5
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'qax1010:BLUE.QUEUE.MANAGER'
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:569)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2716)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:2103)
at com.ibm.mq.jms.MQQueueConnection.(MQQueueConnection.java:171)
at com.ibm.mq.jms.MQQueueConnection.(MQQueueConnection.java:65)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:108)
at com.ibm.mq.jms.MQQueueConnectionFactory.createConnection(MQQueueConnectionFactory.java:965)
The stack trace is of little help... What we need is the LinkedException (part of JMSException).
The LinkedException will give us the completion code and reason code...
Enjoy
_________________
MQ & Broker admin
Context=javax.naming.directory.InitialDirContext@458734bf
Factory=com.ibm.mq.jms.MQQueueConnectionFactory@14fda7f5
MQJMS2005: failed to create MQQueueManager for 'qax1010:BLUE.QUEUE.MANAGER'
com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2058
MQJE036: Queue manager rejected connection attempt
Context=javax.naming.directory.InitialDirContext@458734bf
Factory=com.ibm.mq.jms.MQQueueConnectionFactory@14fda7f5
MQJMS2005: failed to create MQQueueManager for 'qax1010:BLUE.QUEUE.MANAGER'
com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2058
MQJE036: Queue manager rejected connection attempt
Remember case matters. If you have lower or mixed case always have it between single quotes... when running commands in MQSC mode....
2058 0x0000080a MQRC_Q_MGR_NAME_ERROR
Are you sure the port number is right and is not the port number of another qmgr on the same machine??
_________________
MQ & Broker admin
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for '10.2.0.193:U10014111'
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:586)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2110)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1532)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:150)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:185)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:112)
at com.calypso.tk.util.JMSQueueIEAdapter.createProviderConnection(JMSQueueIEAdapter.java:430)
at com.calypso.tk.util.JMSQueueIEAdapter.init(JMSQueueIEAdapter.java:175)
at com.calypso.tk.util.JMSQueueIEAdapter.init(JMSQueueIEAdapter.java:101)
at com.calypso.engine.advice.ImportMessageEngine.start(ImportMessageEngine.java:77)
at com.calypso.apps.startup.StartImportMessageEngine.startNOGUI(StartImportMessageEngine.java:7
at com.calypso.apps.startup.StartImportMessageEngine.main(StartImportMessageEngine.java:49)
Few info:
1. My queue manager is default
dis qcf(QueueConnectionFactory)
MSGRETENTION(YES)
QMANAGER(U10014111)
TARGCLIENTMATCHING(YES)
SSLRESETCOUNT(0)
TEMPMODEL(SYSTEM.DEFAULT.MODEL.QUEUE)
USECONNPOOLING(YES)
POLLINGINT(5000)
RESCANINT(5000)
LOCALADDRESS()
TRANSPORT(CLIENT)
HOSTNAME(10.2.0.193)
TEMPQPREFIX()
CHANNEL(DTCUG_10014111.C1)
SYNCPOINTALLGETS(NO)
CCSID(819)
CONNOPT(STANDARD)
SSLFIPSREQUIRED(NO)
PORT(1425)
VERSION(6)
MSGBATCHSZ(10)
FAILIFQUIESCE(YES)
3. I am running both mq and the application on the same host
4. My port is also 1414 (which is default)
So I am completely confused. Please help me.
Thanks,
You say your port is 1414 (default) but you specified a port of 1425 in the JNDI setup....??
Can you give us the definition of the channel: DTCUG_10014111.C1 and you might have faster response posting here rather than posting me a pm.
_________________
MQ & Broker admin
Initializing JNDI Context...
INITIAL_CONTEXT_FACTORY: com.sun.jndi.fscontext.RefFSContextFactory
PROVIDER_URL: file:/var/mqm
Done.
Welcome to the Admin Tool's command-line interface
InitCtx> dis qcf(QueueConnectionFactory)
MSGRETENTION(YES)
QMANAGER(U10014111)
TARGCLIENTMATCHING(YES)
SSLRESETCOUNT(0)
TEMPMODEL(SYSTEM.DEFAULT.MODEL.QUEUE)
USECONNPOOLING(YES)
POLLINGINT(5000)
RESCANINT(5000)
LOCALADDRESS()
TRANSPORT(CLIENT)
HOSTNAME(localhost)
TEMPQPREFIX()
CHANNEL(DTCUG_10014111.C1)
SYNCPOINTALLGETS(NO)
CCSID(819)
CONNOPT(STANDARD)
SSLFIPSREQUIRED(NO)
PORT(1414)
VERSION(6)
MSGBATCHSZ(10)
FAILIFQUIESCE(YES)
[D] config javax.naming.Context
[D] conv javax.naming.Context
[D] errors javax.naming.Context
[D] log javax.naming.Context
[D] qmgrs javax.naming.Context
[D] trace javax.naming.Context
mqs.ini java.io.File
service.env java.io.File
[D] exits javax.naming.Context
[D] exits64 javax.naming.Context
[D] tivoli javax.naming.Context
.bash_history java.io.File
amqsget java.io.File
amqsput java.io.File
.profile java.io.File
.profile_org java.io.File
gk.cfg java.io.File
.bindings java.io.File
a QueueConnectionFactory com.ibm.mq.jms.MQQueueConnectionFactory
a GSCC.9721.SEND com.ibm.mq.jms.MQQueue
a GSCC.9721.RESPONSE com.ibm.mq.jms.MQQueue
21 Object(s)
9 Context(s)
12 Binding(s), 3 Administered
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'localhost:U10014111'
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:586)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2110)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1532)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:150)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:185)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:112)
at com.calypso.tk.util.JMSQueueIEAdapter.createProviderConnection(JMSQueueIEAdapter.java:430)
at com.calypso.tk.util.JMSQueueIEAdapter.init(JMSQueueIEAdapter.java:175)
at com.calypso.tk.util.JMSQueueIEAdapter.init(JMSQueueIEAdapter.java:101)
at com.calypso.engine.advice.ImportMessageEngine.start(ImportMessageEngine.java:77)
at com.calypso.apps.startup.StartImportMessageEngine.startNOGUI(StartImportMessageEngine.java:7
at com.calypso.apps.startup.StartImportMessageEngine.main(StartImportMessageEngine.java:49)
[LOG|SYSTEM|2008 June 25, 09:00:13 (628)|System.out|main|10.2.0.193 (nydbsunfire.ny.calypso.com)]
And still have the same error. I don't get any other exception. Buy the way I have never did MQ setup before.
Here are the mqm process
-bash-3.2$ ps -ef |grep mqm
mqm 7339 7336 0 16:49:30 ? 0:02 amqzmur0 -m U10014111
sybase 9632 9516 0 09:16:01 pts/2 0:00 grep mqm
mqm 7346 7342 0 16:49:31 ? 0:00 /opt/mqm/bin/runmqlsr -r -m U10014111 -t TCP -p 1414
mqm 9563 9561 0 08:56:08 pts/4 0:00 -bash
mqm 7345 7342 0 16:49:31 ? 0:01 /opt/mqm/bin/amqpcsea U10014111
mqm 7337 7336 0 16:49:30 ? 0:01 /opt/mqm/bin/amqzfuma -m U10014111
mqm 7484 7346 0 17:12:39 ? 0:00 /opt/mqm/bin/amqrmppa -m U10014111
mqm 9585 9584 0 08:59:01 pts/4 0:02 java -DMQJMS_LOG_DIR=/log -DMQJMS_TRACE_DIR=/trace -DMQJMS_INSTALL_PATH=/opt/mq
mqm 9584 9563 0 08:59:01 pts/4 0:00 /bin/sh ./JMSAdmin -v
mqm 9561 9558 0 08:56:08 ? 0:00 /usr/lib/ssh/sshd
mqm 7340 7336 0 16:49:30 ? 0:00 /opt/mqm/bin/amqrrmfa -t2332800 -s2592000 -p2592000 -g5184000 -c3600 -m U100141
mqm 7341 7336 0 16:49:30 ? 0:00 /opt/mqm/bin/amqzdmaa -m U10014111
mqm 7583 1 0 17:46:16 ? 1:48 java -DMQJMS_LOG_DIR=/log -DMQJMS_TRACE_DIR=/trace -DMQJMS_INSTALL_PATH=/opt/mq
mqm 7336 1 0 16:49:30 ? 0:05 amqzxma0 -m U10014111
mqm 7342 7336 0 16:49:30 ? 0:00 /opt/mqm/bin/amqzmgr0 -m U10014111
mqm 7343 7336 0 16:49:31 ? 0:02 amqzlaa0 -mU10014111 -fip0
mqm 7344 7342 0 16:49:31 ? 0:02 /opt/mqm/bin/runmqchi -m U10014111 -r
mqm 7338 7336 0 16:49:30 ? 0:01 amqzmuc0 -m U10014111
jms.queue.connectionFactory=QueueConnectionFactory
def qcf(QueueConnectionFactory) qmgr(U10014111) PORT(1414) CHANNEL(DTCUG_10014111.C1) TRANSPORT(CLIENT)
def q(GSCC.9721.RESPONSE) qmgr(U10014111) qu(GSCC.9721.RESPONSE) tc(JMS)
def q(GSCC.9721.SEND) qmgr(U10014111) qu(GSCC.9721.SEND) tc(MQ)
Thanks,
define qlocal (GSCC.9721.SEND) USAGE (XMITQ) DEFPSIST(YES) TRIGDATA(10014111_DTCUG.C1) INITQ(SYSTEM.CHANNEL.INITQ)
define qremote (local.def.of.remote.queue) rname (MCCT.9721.TGSCC.INPUT) rqmname ('UDTCQUG1') xmitq (GSCC.9721.SEND)
define channel (10014111_DTCUG.C1) chltype (sdr) conname ('207.45.34.7(1425)') xmitq(GSCC.9721.SEND) trptype (tcp)
define qlocal (GSCC.9721.RESPONSE) DEFPSIST(YES)
define listener (GSCC_LISTENER) trptype (tcp) control (qmgr) port(1414)
start listener (GSCC_LISTENER)
define channel (DTCUG_10014111.C1) chltype (rcvr) trptype (tcp)
define channel (DTCUG_10014111.C1) chltype (rcvr) trptype (tcp)
Here is your problem. You need to attach to a SVRCONN type of channel with a client connection.
See the intercommunications manual
and the client manual
_________________
MQ & Broker admin
MQSeries.net Forum Index
»
IBM MQ Java / JMS
»
MQJMS2005: failed to create MQQueueManager for ....
Jump to: