>From the manual: =========================== MQRC_HOBJ_ERROR The object handle Hobj is not valid. If the handle is a shareable handle, the handle may have been made invalid by another thread issuing the MQCLOSE call using that handle. If the handle is a nonshareable handle, the call may have been issued by a thread that did not create the handle. This reason also occurs if the parameter pointer is not valid, or (for the MQOPEN call) points to read-only storage. (It is not always possible to detect parameter pointers that are not valid; if not detected, unpredictable results occur.)
Corrective action: Ensure that a successful MQOPEN call is performed for this object, and that an MQCLOSE call has not already been performed for it. For MQGET and MQPUT calls, also ensure that the handle represents a queue object. Ensure that the handle is being used within its valid scope. =========================== One thing that we found with JMS was that it would close down a queue connection but leave the process running if it got stuck in a backout loop AND was unable to requeue the bad message. In our case, the user had no authority to the DeadQ and we had not specified a Backout Queue and Backout Threshold. Changing either of these factors - giving PUT authority to the DeadQ or specifying a Backout Queue - prevented JMS from taking this action. Instead it would requeue the message and continue processing. We also found out that the action was detectable if enclosed in a catch block. I'm not suggesting that you have this exact problem, just that IBM's JMS code will do some unexpected things to recover from a problem - including closing your queue. Then if you try to read from it again, the handle is no longer valid. Of course it's also entirely possible the problem is something *you* did and not IBM. ;-) -- T.Rob -----Original Message----- From: Meital Geron-Issers [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 30, 2003 3:30 AM To: [EMAIL PROTECTED] Subject: failed to get message from MQ queue Hello, I started using websphere 5.1 with MQ 5.3 and I encountered a problem while I called the QueueReceiver.receive() method. The exception I got is: JMSMessageCon e Caught JMSException in receive javax.jms.JMSException: MQJMS2002: failed to get message from MQ queue at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.jav a:540) at com.ibm.mq.jms.MQQueueReceiver.getMessage(MQQueueReceiver.java:1743) at com.ibm.mq.jms.MQQueueReceiver.receiveInternal(MQQueueReceiver.java:1152) at com.ibm.mq.jms.MQQueueReceiver.receive(MQQueueReceiver.java:471) at com.ibm.ejs.jms.JMSMessageConsumerHandle.receive(JMSMessageConsumerHandle.ja va:228) and the linked exception is: JMSMessageCon e Linked exception com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019 at com.ibm.mq.MQQueue.getMsg2(MQQueue.java:893) at com.ibm.mq.jms.MQQueueReceiver.getMessage(MQQueueReceiver.java:1473) at com.ibm.mq.jms.MQQueueReceiver.receiveInternal(MQQueueReceiver.java:1152) at com.ibm.mq.jms.MQQueueReceiver.receive(MQQueueReceiver.java:471) at com.ibm.ejs.jms.JMSMessageConsumerHandle.receive(JMSMessageConsumerHandle.ja va:228) I would appreciate any help with this issue. Thanks Meital Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive