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.MQException: Completion Code 2, Reason 2085

Post new topic  Reply to topic
 com.ibm.mq.MQException: Completion Code 2, Reason 2085 « View previous topic :: View next topic » 
Author Message
jsantha
PostPosted: Thu Sep 30, 2010 12:20 pm    Post subject: com.ibm.mq.MQException: Completion Code 2, Reason 2085 Reply with quote

Newbie

Joined: 30 Sep 2010
Posts: 4

Hi ,

I am getting com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2085.

Below is my Java Code Snippet.

public static boolean sendMQMessage (String messageXml){
try {
int openOptions =MQC.MQOO_OUTPUT;
MQQueueManager qManager = new MQQueueManager("IVAPP.DEV.FL");
MQQueue queue = qManager.accessQueue("order_mgr",openOptions);
MQMessage outMessage = new MQMessage();
outMessage.format = MQC.MQFMT_STRING;
outMessage.writeString("All is well");
queue.put(outMessage);
queue.close();
qManager.disconnect();
} catch (Exception ex) {
Logger.log(2,"Exception occured in sending MQ Message"+ex);
ex.printStackTrace();
return false;
}


I checked that the QMGR IVAPP.DEV.FL has the queue order_mgr defined.
Below is the runmqsc result on DISPLAY QUEUE ('IVAPP.DEV.FL.order_mgr')
DISPLAY QUEUE('IVAPP.DEV.FL.order_mgr')
1 : DISPLAY QUEUE('IVAPP.DEV.FL.order_mgr')
AMQ8409: Display Queue details.
DESCR(WebSphere MQ Default Local Queue)
PROCESS( ) BOQNAME( )
INITQ( ) TRIGDATA( )
CLUSTER(IVAPP) CLUSNL( )
QUEUE(IVAPP.DEV.FL.order_mgr) CRDATE(2010-08-19)
CRTIME(16.19.16) ALTDATE(2010-09-29)
ALTTIME(23.23.15) GET(ENABLED)
PUT(ENABLED) DEFPRTY(5)
DEFPSIST(NO) MAXDEPTH(10000)
MAXMSGL(4000000) BOTHRESH(5)
SHARE DEFSOPT(SHARED)
HARDENBO MSGDLVSQ(PRIORITY)
RETINTVL(999999999) USAGE(NORMAL)
NOTRIGGER TRIGTYPE(FIRST)
TRIGDPTH(1) TRIGMPRI(0)
QDEPTHHI(99) QDEPTHLO(20)
QDPMAXEV(ENABLED) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QSVCINT(999999999)
QSVCIEV(HIGH) DISTL(NO)
NPMCLASS(NORMAL) DEFTYPE(PREDEFINED)
TYPE(QLOCAL) SCOPE(QMGR)
DEFBIND(OPEN) IPPROCS(2)
OPPROCS(0) CURDEPTH(0)

Please guide me here. I am assuming that the issue is because my queue name is case sensitive - order_mgr. But I am not sure how to resolve this issue in java. In runmqsc I use ' ' around the queue name.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Sep 30, 2010 12:25 pm    Post subject: Re: com.ibm.mq.MQException: Completion Code 2, Reason 2085 Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jsantha wrote:
I am assuming that the issue is because my queue name is case sensitive - order_mgr.


I don't think so. The name of the queue in that display is <IVAPP.DEV.FL.order_mgr>, you're trying to open a queue called <order_mgr>.

While queues are typically shown in documentation and examples as <queue manager>.<queue name> that's a documentation convention. Following that convention your queue would be shown as <IVAPP.DEV.FL.IVAPP.DEV.FL.order_mgr>

Not directly connected to your problem but best practice is to always give WMQ objects upper case names. It saves all these problems with programming languages & OS (like z/OS) that fold to upper case unless prevented.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jsantha
PostPosted: Thu Sep 30, 2010 12:31 pm    Post subject: com.ibm.mq.MQException: Completion Code 2, Reason 2085 Reply with quote

Newbie

Joined: 30 Sep 2010
Posts: 4

While I completely agree that queue names should be upper case, I am trying to post to a queue of a external team. Unfortunately, Cannot ask them to change the queue name.

Is there something wrong with the openOptions specified ? I am only trying to post to the queue.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Sep 30, 2010 12:34 pm    Post subject: Re: com.ibm.mq.MQException: Completion Code 2, Reason 2085 Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jsantha wrote:
Is there something wrong with the openOptions specified ? I am only trying to post to the queue.


Only the name is wrong. If the options were wrong you'd get a different reason code.

IMHO if that's the queue definition the external team are using their stupidity has forfitted any right they may have to insist on lower case object names!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jsantha
PostPosted: Thu Sep 30, 2010 12:42 pm    Post subject: com.ibm.mq.MQException: Completion Code 2, Reason 2085 Reply with quote

Newbie

Joined: 30 Sep 2010
Posts: 4

Wow resolved the issue !!!!!

Changed the java code as follows and it worked
MQQueueManager qManager = new MQQueueManager("IVAPP.DEV.FL");

MQQueue queue = qManager.accessQueue("IVAPP.DEV.FL.order_mgr",openOptions);

instead of
MQQueueManager qManager = new MQQueueManager("IVAPP.DEV.FL");
MQQueue queue = qManager.accessQueue("order_mgr",openOptions);

Thanks a lot for the help .
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Sep 30, 2010 12:44 pm    Post subject: Re: com.ibm.mq.MQException: Completion Code 2, Reason 2085 Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jsantha wrote:
Wow resolved the issue !!!!!


It's amazing how fast using the right name solves 2085 errors...

I'm also impressed by the quality of your original post, which had the necessary information & demonstrated an attempt to resolve the problem. Seen all too seldom round here.

Well done you.


_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jsantha
PostPosted: Thu Sep 30, 2010 12:48 pm    Post subject: com.ibm.mq.MQException: Completion Code 2, Reason 2085 Reply with quote

Newbie

Joined: 30 Sep 2010
Posts: 4

Thanks .

Appreciate your timely help. Pretty quick resolution
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » com.ibm.mq.MQException: Completion 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.