ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » com.ibm.mq.pcf.PCFException MQJE001: Comp Code 2,Reason 2085

Post new topic  Reply to topic Goto page 1, 2  Next
 com.ibm.mq.pcf.PCFException MQJE001: Comp Code 2,Reason 2085 « View previous topic :: View next topic » 
Author Message
balareddy
PostPosted: Mon Aug 13, 2007 7:01 am    Post subject: com.ibm.mq.pcf.PCFException MQJE001: Comp Code 2,Reason 2085 Reply with quote

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
View user's profile Send private message AIM Address
Vitor
PostPosted: Mon Aug 13, 2007 7:10 am    Post subject: Reply with quote

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
View user's profile Send private message
balareddy
PostPosted: Mon Aug 13, 2007 7:22 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Vitor
PostPosted: Mon Aug 13, 2007 7:24 am    Post subject: Reply with quote

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
View user's profile Send private message
RogerLacroix
PostPosted: Mon Aug 13, 2007 8:06 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
balareddy
PostPosted: Mon Aug 13, 2007 8:20 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
balareddy
PostPosted: Thu Aug 16, 2007 5:35 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Vitor
PostPosted: Thu Aug 16, 2007 5:41 am    Post subject: Reply with quote

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
View user's profile Send private message
balareddy
PostPosted: Thu Aug 16, 2007 5:45 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
jefflowrey
PostPosted: Thu Aug 16, 2007 5:45 am    Post subject: Reply with quote

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
View user's profile Send private message
balareddy
PostPosted: Thu Aug 16, 2007 5:48 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Vitor
PostPosted: Thu Aug 16, 2007 5:48 am    Post subject: Reply with quote

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
View user's profile Send private message
balareddy
PostPosted: Thu Aug 16, 2007 5:56 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Vitor
PostPosted: Thu Aug 16, 2007 5:59 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Thu Aug 16, 2007 6:52 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ Java / JMS » com.ibm.mq.pcf.PCFException MQJE001: Comp Code 2,Reason 2085
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.