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 » MQJMS2007: MQJE001: Completion Code 2, Reason 2009

Post new topic  Reply to topic
 MQJMS2007: MQJE001: Completion Code 2, Reason 2009 « View previous topic :: View next topic » 
Author Message
shubhu_s
PostPosted: Wed Dec 20, 2006 12:22 pm    Post subject: MQJMS2007: MQJE001: Completion Code 2, Reason 2009 Reply with quote

Newbie

Joined: 19 Dec 2006
Posts: 2

Hi,

My JMS client is on Wondows 2003 Server and Websphere App Server and Websphere MQ are intalled on an AIX box.
As per our system requirement, we have to have a communication between the two.
I'm able to obtain app server initial context, queue connection factory for MQ Queue Manager and also able to receive messages from inbound queue using JMS APIs. As soon as my client invokes sender.send(msg), MQ throws an error
JMS exception: [Ljava.lang.StackTraceElement;@5b4ef564 MQJMS2007: failed to send message to MQ queue
Linked exception: com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2009
and client loses the connection to app server.

I have searched through the net, but could not find a concrete solution to the problem and tried number of ways to resolve it.
I think its a problem with MQ then the configuration, because when I can read the message successfully, why should not it allow me to write.
Please help.

Thanks'
Shubhendu Shrivastava
Back to top
View user's profile Send private message
killer
PostPosted: Wed Dec 20, 2006 1:21 pm    Post subject: Reply with quote

Apprentice

Joined: 06 Jul 2006
Posts: 35

Hi,

Check the channel are running fine or not.
And check ,the status of channel after ur client want to send the message.

Reason code 2009,indicates there is connection issue,so make sure communication link is fine and check the channel attributes.

Back to top
View user's profile Send private message Send e-mail
shubhu_s
PostPosted: Wed Dec 20, 2006 1:38 pm    Post subject: Reply with quote

Newbie

Joined: 19 Dec 2006
Posts: 2

I've verified channel, there is absolutely no problem with it. in fact my program is smart enough to re-obtain the connection as soon as it looses it..
Are there any security attibutes at Websphere or MQ level, which do not allow me to write to the quque and disconnect the client as soon as it tries that?
Back to top
View user's profile Send private message
killer
PostPosted: Wed Dec 20, 2006 3:22 pm    Post subject: Reply with quote

Apprentice

Joined: 06 Jul 2006
Posts: 35

I don't think there,is any security issue as you only mentioed that u are getting 2009 reason code,which is MQRC_CONNECTION_BROKEN.
This indicates connection with the Qmgr is lost.

Had there been any security issue ,u would have got 2035 error.Isn't it?



Back to top
View user's profile Send private message Send e-mail
wschutz
PostPosted: Wed Dec 20, 2006 3:29 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Common problem... search here for 2009 and JMS
Is there a firewall?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
java_ppl
PostPosted: Thu Dec 21, 2006 9:48 am    Post subject: Reply with quote

Novice

Joined: 22 Sep 2006
Posts: 13

hello?
Back to top
View user's profile Send private message
JosephGramig
PostPosted: Thu Dec 21, 2006 10:28 am    Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

With the Search link at the top of the page.
_________________
Joseph
Administrator - IBM WebSphere MQ (WMQ) V6.0, IBM WebSphere Message Broker (WMB) V6.1 & V6.0
Solution Designer - WMQ V6.0
Solution Developer - WMB V6.1 & V6.0, WMQ V5.3
Back to top
View user's profile Send private message AIM Address
java_ppl
PostPosted: Fri Jan 05, 2007 3:47 am    Post subject: Reply with quote

Novice

Joined: 22 Sep 2006
Posts: 13

Hi shubhu_s,

Quote:
my program is smart enough to re-obtain the connection as soon as it looses it..


Please could you post this piece of code ? My application is trying to do the same , but keeps throwing the 2009 Connection broken exception .

Thanks.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Jan 05, 2007 4:10 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I'm sure shubbhu_s doesn't do anything more complicated than repeat the same code.

If you are unable to achieve a connection when you retry it after it fails - then either you are not properly repeating all of the necessary code to create a good connection. OR there is something sufficiently wrong with the QUEUE MANAGER or the NETWORK that your program won't be able to reconnect without manual intervention.

You need to write code to cover both those cases. This is not hard, if you think about it.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
java_ppl
PostPosted: Mon Feb 12, 2007 5:57 am    Post subject: Reply with quote

Novice

Joined: 22 Sep 2006
Posts: 13

Hi Ive tried the following:
boolean flag=true
while(flag)
{
If queue Manager connected
then Print : QManager Connected
If queue connected
then Print : Q Connected

try{
queue.get(message, gmo);
flag=false;
}
catch(Exception e1)
{
queue.disconnect();
queueManager.disconnect();
//Establish a new connection using a function
createWMQObjects(Config.getQueueManagerName(),
,Config.getQueueName());

}

}



The function createWMQObjects definition looks like this:
public static void createWMQObjects(String queueManagerName, String appQueueName) {
createQueueManager(queueManagerName);
createAppQueue(appQueueName,
MQC.MQOO_OUTPUT );
createStatusQueue(appQueueName +
Config.getStatusQueueSuffix(),
MQC.MQOO_INPUT_EXCLUSIVE
| MQC.MQOO_OUTPUT
| MQC.MQOO_BROWSE);

}


createQueueManager Definition:
queueManager = new MQQueueManager(queueManagerName);
createAppQueue Defintion :
appQueue = accessQueue(queueName, openOptions);
createStatusQueue Definition:
statusQueue = accessQueue(queueName, openOptions);

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

After runnning the code;the output loooks like this:
Inside getMessage() Function...
***QManager Connected***
***Queue Connected***
Exception occurred 1!!
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2009
Exception occurred 2!!
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019
***QManager Disconnected***
***Queue Connected***
Exception occurred 1!!
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019
Exception occurred 2!!
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019
***QManager Disconnected***
***Queue Connected***
Exception occurred 1!!
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019
Exception occurred 2!!
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019
***QManager Disconnected***
***Queue Connected***
Exception occurred 1!!

and so on......................

Please could you tell me what the problem could be?

Thanks.

jp
Back to top
View user's profile Send private message
java_ppl
PostPosted: Mon Feb 12, 2007 6:01 am    Post subject: Reply with quote

Novice

Joined: 22 Sep 2006
Posts: 13

uh .. the code looks more like this..

while(flag)
{
If queue Manager connected
then Print : QManager Connected
If queue connected
then Print : Q Connected

try{
queue.get(message, gmo);
flag=false;
}
catch(Exception e1)
{
Print : Exception 1 occurred
queue.disconnect();
queueManager.disconnect();
//Establish a new connection using a function
try{
createWMQObjects(Config.getQueueManagerName(),
,Config.getQueueName());

}
catch(Exception e2)
{
Print : Exception 2 occurred;
}

}

}
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 » MQJMS2007: MQJE001: Completion Code 2, Reason 2009
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.