Author |
Message
|
balareddy |
Posted: Mon Aug 13, 2007 7:01 am Post subject: com.ibm.mq.pcf.PCFException MQJE001: Comp Code 2,Reason 2085 |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
Hello,
I am using JMS to connect MQ Queue. I am not using any application server. Running as standalone java program in AIX5.2. I am getting the following error only sometimes. all other times it is working fine.
javax.naming.NamingException: Caught a PCF Exception: com.ibm.mq.pcf.PCFException: MQJE001: Completion Code 2, Reason 2085. Root exception is com.ibm.mq.pcf.PCFException: MQJE001: Completion Code 2, Reason 2085
at com.ibm.mq.pcf.PCFMessageAgent.send(PCFMessageAgent.java:299)
at com.ibm.mq.pcf.PCFMessageAgent.send(PCFMessageAgent.java:224)
at com.ibm.mq.jms.context.MQContext.getAllQueues(MQContext.java:431)
at com.ibm.mq.jms.context.MQContext.list(MQContext.java:565)
at com.ibm.mq.jms.context.MQContext.list(MQContext.java:542)
at com.ibm.mq.jms.context.MQContext.lookup(MQContext.java:628)
at com.ibm.mq.jms.context.MQContext.lookup(MQContext.java:609)
at javax.naming.InitialContext.lookup(InitialContext.java:360)
Could anybody please let me know why this error occures.
Reason code 2085 says Object name is not valid. If object name is not valid how come it is working most of the times..
Please reply _________________ bala |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 13, 2007 7:10 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
2085 is typically caused by a queue not being found, often because the case of the name is wrong. Depending on how this code snippet is being given the name this could be a cause.
Another posible cause is the code trying to open a dynamic queue that's been deleted. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
balareddy |
Posted: Mon Aug 13, 2007 7:22 am Post subject: |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
[quote="Vitor"]2085 is typically caused by a queue not being found, often because the case of the name is wrong. Depending on how this code snippet is being given the name this could be a cause.
[quote]
hi,
I am using QCF to create QueueConnectionFactory. I am creating Context with MQ factory class,hostname and port. It is failing at context Lookup while creating QueueConnectionFactory, not while creating Queues. _________________ bala |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 13, 2007 7:24 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
balareddy wrote: |
I am using QCF to create QueueConnectionFactory. I am creating Context with MQ factory class,hostname and port. It is failing at context Lookup while creating QueueConnectionFactory, not while creating Queues. |
And how does that contradict what I said??  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Mon Aug 13, 2007 8:06 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
balareddy wrote: |
It is failing at context Lookup while creating QueueConnectionFactory, not while creating Queues. |
Are you trying to use MQ itself as the JNDI repository? If so, did you setup it up? (There are manual steps you need to do first.)
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
balareddy |
Posted: Mon Aug 13, 2007 8:20 am Post subject: |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
[quote="RogerLacroix"]
Are you trying to use MQ itself as the JNDI repository? If so, did you setup it up? (There are manual steps you need to do first.)
quote]
I have created qcf in JMSAdmin console and using this qcf in JMS context by provider url looking up(hostname:port/channel). Same setup(code) is working fine most of the times. only sometimes it is giving the above exception. I did not change my code. _________________ bala |
|
Back to top |
|
 |
balareddy |
Posted: Thu Aug 16, 2007 5:35 am Post subject: |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
I am using the following code to lookup context for QCF. I have created QCF with JMSAdmin. My code is working most of the times but sometimes it is giving NamingException. From MQ client machine i am running 3 java programs and 3 are creating QueueConnectionFactory at the same time. These 3 programs are getting executed by AIX cronjobs.
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.mq.jms.context.WMQInitialContextFactory");
props.put(Context.PROVIDER_URL, "hostname:port/SYSTEM.DEF.SVRCONN");
Context ctx= new InitialContext(props);
QueueConnectionFactory qcf = (QueueConnectionFactory) ctx.lookup("QCF");
QueueConnection qConn=qcf.createQueueConnection();
javax.naming.NamingException: Caught a PCF Exception: com.ibm.mq.pcf.PCFException: MQJE001: Completion Code 2, Reason 2085. Root exception is com.ibm.mq.pcf.PCFException: MQJE001: Completion Code 2, Reason 2085
at com.ibm.mq.pcf.PCFMessageAgent.send(PCFMessageAgent.java:299)
at com.ibm.mq.pcf.PCFMessageAgent.send(PCFMessageAgent.java:224)
at com.ibm.mq.jms.context.MQContext.getAllQueues(MQContext.java:431)
at com.ibm.mq.jms.context.MQContext.list(MQContext.java:565)
at com.ibm.mq.jms.context.MQContext.list(MQContext.java:542)
at com.ibm.mq.jms.context.MQContext.lookup(MQContext.java:628)
at com.ibm.mq.jms.context.MQContext.lookup(MQContext.java:609)
at javax.naming.InitialContext.lookup(InitialContext.java:360)
Is there any bottleneck for MQ if morethan 1 client lookup's are executing at the same time, some are rejected by MQ server due to sometimeout or something else???
Program is throwing NamingException with reason code 2085. If there any possibility to get linkedException form MQ?? _________________ bala |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 16, 2007 5:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
On the understanding I know slightly more about the dark side of the Moon than I do about Java, I wouldn't have thought you'd get a 2085 from a timeout, more likely a 2009.
If the QCF isn't generating a dynamic queue that's going out of scope, you're most likely getting a blank or null name back under certain circumstances. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
balareddy |
Posted: Thu Aug 16, 2007 5:45 am Post subject: |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
Vitor wrote: |
On the understanding I know slightly more about the dark side of the Moon than I do about Java, I wouldn't have thought you'd get a 2085 from a timeout, more likely a 2009.
|
i think 2009 is not possible for my MQ because i had setup MAXCHANNELS count as 400 in qm.ini which will never reach. I alwys check used channels also which is very less. _________________ bala |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 16, 2007 5:45 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The other possibility is that, because you're using the WMQ context (which is not the best idea in the world, in my opinion), that the JDNI context can't talk to the Command Server - and it's the context lookup that's returning the 2085.
Probably because you didn't follow all the instructions necessary for setting up the WMQ JNDI context.
Which is not the best context to use, really. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
balareddy |
Posted: Thu Aug 16, 2007 5:48 am Post subject: |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
jefflowrey wrote: |
The other possibility is that, because you're using the WMQ context (which is not the best idea in the world, in my opinion), that the JDNI context can't talk to the Command Server - and it's the context lookup that's returning the 2085.
Probably because you didn't follow all the instructions necessary for setting up the WMQ JNDI context.
Which is not the best context to use, really. |
Program is throwing NamingException with reason code 2085. If there any possibility to get linkedException form MQ?? _________________ bala |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 16, 2007 5:48 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
balareddy wrote: |
Vitor wrote: |
On the understanding I know slightly more about the dark side of the Moon than I do about Java, I wouldn't have thought you'd get a 2085 from a timeout, more likely a 2009.
|
i think 2009 is not possible for my MQ because i had setup MAXCHANNELS count as 400 in qm.ini which will never reach. I alwys check used channels also which is very less. |
You'd be surprised.....  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
balareddy |
Posted: Thu Aug 16, 2007 5:56 am Post subject: |
|
|
Acolyte
Joined: 06 Feb 2006 Posts: 54
|
Thanks for the very fast reply. I think my request is going behind ur reply. here is agian my question.
Program is throwing NamingException while context lookup with reason code 2085. If there any possibility to get linkedException form MQ?? _________________ bala |
|
Back to top |
|
 |
Vitor |
Posted: Thu Aug 16, 2007 5:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
balareddy wrote: |
Program is throwing NamingException while context lookup with reason code 2085. If there any possibility to get linkedException form MQ?? |
Yes, it can be extracted using what I understand is the normal Java method (if you search in here it's been discussed a few times & someone posted an example snippet IIRC). Typically it contains the MQ reason code so I wonder if it'll tell you that much more than you already know, but certainly worth a try. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 16, 2007 6:52 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Again, if you're getting this in a NamingException - then either
a) you don't have the qmgr set up right to provide the WMQContext, or
b) the object you're looking up doesn't actually exist. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|