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 » problem reading message Reason 2019

Post new topic  Reply to topic
 problem reading message Reason 2019 « View previous topic :: View next topic » 
Author Message
Ravee Bhat
PostPosted: Fri Jun 18, 2004 5:26 am    Post subject: problem reading message Reason 2019 Reply with quote

Apprentice

Joined: 28 Apr 2004
Posts: 28
Location: Bangalore, INDIA

All
I am reading messages from a queue, in an application running on Oracle 9iAS rel 2 (9.0.2), For a while everything seems to be fine, reading from queue. After a while the code throws out these exceptions.
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2009
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019

2009 is always before 2019.
I am a bit puzzled now.
I suspect the network (communication) error, not sure though.
here is the stacktrace ...
Code:

MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE007: IO error reading message data
MQJE001: Completion Code 2, Reason 2009
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2009
   at com.ibm.mq.MQManagedObject.close(MQManagedObject.java:386)
   at com.ibm.mq.MQQueue.close(MQQueue.java:1393)
   at com.ccd.common.communication.mqseries.MQListener.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:484)
Error occured during API call - reason code0
MQJE001: Completion Code 2, Reason 2009
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2009
   at com.ibm.mq.MQQueueManager.accessQueue(MQQueueManager.java:1391)
   at com.ibm.mq.MQQueueManager.accessQueue(MQQueueManager.java:1436)
   at com.ccd.common.communication.mqseries.MQListener.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:484)
MQJE001: Completion Code 2, Reason 2019
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019
   at com.ibm.mq.MQQueueManager.accessQueue(MQQueueManager.java:1391)
   at com.ibm.mq.MQQueueManager.accessQueue(MQQueueManager.java:1436)
   at com.ccd.common.communication.mqseries.MQListener.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:484)

can someone throw some light on this part?

thanks in advance

Ravee
_________________
Lets go see The World.
Back to top
View user's profile Send private message Visit poster's website
RogerLacroix
PostPosted: Fri Jun 18, 2004 8:05 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

That makes perfect sense. Did you look up those Reason Codes in the manual?

You are not handling the first error (2009), hence you get the invalid object handle error. You must reconnect to the queue manager and reopen your queues on a Connection Broken error.

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Ravee Bhat
PostPosted: Sat Jun 19, 2004 2:06 am    Post subject: Reply with quote

Apprentice

Joined: 28 Apr 2004
Posts: 28
Location: Bangalore, INDIA

Thanks Roger
Now on a 2009, I am creating a new MQQueueManager object with the same environment options, And I am getting 2059,. this might be due to the network error!!?
Do I need to poll the Queue Manager for availability? As the manual says "It may be necessary to poll until a successful response is received."

thanks

Ravee
_________________
Lets go see The World.
Back to top
View user's profile Send private message Visit poster's website
RogerLacroix
PostPosted: Sat Jun 19, 2004 4:58 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Yes you do.

I would first start with the MQQueueManager method of isConnected and then proceed with reconnecting.

Here's a couple of questions:
- Do you have KeepAlive enabled for the queue manager?
- Do you connect to a queue manager for hours and hours but have very little message flow?

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
Ravee Bhat
PostPosted: Mon Jun 21, 2004 2:39 am    Post subject: Reply with quote

Apprentice

Joined: 28 Apr 2004
Posts: 28
Location: Bangalore, INDIA

ah ok!
I have not set KeepAlive for the QueueManager. My app does not use the JMS either. And for the second question, yes I am keeping the Queue Manager connected for hours and message flow is less to moderate.

I am not sure if this is a good design, there must be other ways to do it also. The thing is we are not able to use MDB + oc4j connector to connect to WMQ in Oracle 9iAS (is this true,that its not supported in Ora 9i AS 9.0.2 R2?) and hence we are connecting/managing the communication ourselves.

btw I implemented the idea and its working now. I also get "MQJE005: TSH eyecatcher not found. Eyecatcher was 53482000" this error now.!!

looks like loads of learning happening

thanks and regards
Ravee
_________________
Lets go see The World.
Back to top
View user's profile Send private message Visit poster's website
RogerLacroix
PostPosted: Mon Jun 21, 2004 8:37 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

TSH is for the Transmission Segment Header. It sounds like you hosed something up. Are you writing directly to transmission queue?

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
Ravee Bhat
PostPosted: Tue Jun 22, 2004 6:23 am    Post subject: Reply with quote

Apprentice

Joined: 28 Apr 2004
Posts: 28
Location: Bangalore, INDIA

Hi Roger
Looks like i have messed the whole thing up. I am writing into the queue using my sample java app and reading is done by the other program running on my 9iAS box, while reading the sequence is something like this...
Quote:
. set the environment properties
ii. create the MQManager
iii. set Get Message Options
iv. set Open Options
v. create MQMessage
vi. create MQQueue
vii. access Queue
viii. check current depth if +ve retrieve message
ix. close MQ Queue


on a 2009 i am repeating the same steps

regards
Ravee
_________________
Lets go see The World.
Back to top
View user's profile Send private message Visit poster's website
vennela
PostPosted: Tue Jun 22, 2004 7:16 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Quote:
viii. check current depth if +ve retrieve message


It would be better if you change this and do a GET. If there are no messages then you would get an MQException with 2033. Then you can either wait or end. But if there are messages then your GET will be successful.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ravee Bhat
PostPosted: Thu Jun 24, 2004 11:19 pm    Post subject: Reply with quote

Apprentice

Joined: 28 Apr 2004
Posts: 28
Location: Bangalore, INDIA

thanks for the input,
I have one more doubt,
Quote:
aMQGetMessageOptions.options = MQC.MQGMO_WAIT | MQC.MQGMO_CONVERT;
aMQGetMessageOptions.waitInterval = 300;

and
Quote:
int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_OUTPUT | MQC.MQOO_INQUIRE;
are the options i have set. Is something missing or extra there?

regards
Ravee
_________________
Lets go see The World.
Back to top
View user's profile Send private message Visit poster's website
RogerLacroix
PostPosted: Fri Jun 25, 2004 7:37 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

The first one is fine.

The second piece of code is wrong. You do either:
Code:
int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_INQUIRE;

OR
Code:
int openOptions = MQC.MQOO_OUTPUT  | MQC.MQOO_INQUIRE;

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Ravee Bhat
PostPosted: Tue Jun 29, 2004 7:23 am    Post subject: Reply with quote

Apprentice

Joined: 28 Apr 2004
Posts: 28
Location: Bangalore, INDIA

Thanks Roger.
I just updated my code, seems to be working fine.

regards
Ravee
_________________
Lets go see The World.
Back to top
View user's profile Send private message Visit poster's website
paulg
PostPosted: Sat Sep 18, 2004 10:39 am    Post subject: Any use of oracle Interconnect Adatper? Reply with quote

Newbie

Joined: 12 Apr 2004
Posts: 1
Location: Owego, NY

We are looking at setting up a new connection between an Oracle9ias application and an MQ 5.3 machine loacle to the Oracle server. We find documentation on the Oracle 9iAS InterConnect for MQSeries prouct. Is it needed or can we just slide the MQ libraries into our container for the Oracle App? What benefits do I get from the Interconnect product? Can you supply any hints on using this product or same apps to place in the oracle container?

Thanks!

Paul
_________________
Thanks Much!

Paul
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 » problem reading message Reason 2019
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.