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 » Null Pointer in receiveNoWait() in Java for MQ

Post new topic  Reply to topic
 Null Pointer in receiveNoWait() in Java for MQ « View previous topic :: View next topic » 
Author Message
zhaobin
PostPosted: Tue Oct 29, 2002 11:12 pm    Post subject: Null Pointer in receiveNoWait() in Java for MQ Reply with quote

Novice

Joined: 29 Oct 2002
Posts: 20

Hi,

I am developing JMS programs on W2K using Java for MQSeries. I got a null pointer exception when I did a receiveNoWait(). See the exception below.

java.lang.NullPointerException:
at com.ibm.mq.jms.MQJMSMessage.createJMSMessage
(MQJMSMessage.java:309)
at com.ibm.mq.jms.MQQueueReceiver.getMessage
(MQQueueReceiver.java:1138)
at com.ibm.mq.jms.MQQueueReceiver.receiveInternal
(MQQueueReceiver.java:894)
at com.ibm.mq.jms.MQQueueReceiver.receiveNoWait
(MQQueueReceiver.java:381)

Detailed information: I have two Queue Managers. One is on AS/400 and one is on W2K (both are 5.21). One JMS program on AS/400 sends messages to a remote queue to the Queue Manager on AS/400. The messages are transferred to the Queue Manager on W2K. Another JMS program receives messages from the local queue on W2K. I got the null pointer exception when the JMS program tries to receive messages from the queue and there are some messages on the queue. I cleared messages from the queue and resend messages from AS/400. Then the null pointer exception disappeared.

I suspect the null pointer is because of some corrupted messages on the queue. So has anyone encountered similiar thing before? Is it a bug in the Java for MQ or MQ itself?

thanks
Back to top
View user's profile Send private message
kingdon
PostPosted: Wed Oct 30, 2002 7:50 am    Post subject: Reply with quote

Acolyte

Joined: 14 Jan 2002
Posts: 63
Location: UK

You shouldn't be getting NullPointerExceptions out of a receiveNoWait call.
Can you reliably reproduce this problem, and are you at the latest level of the MQ JMS product? If the answer to both those questions is yes it would be very helpful if you could raise the problem through IBM service.

Many thanks,
James Kingdon.
Back to top
View user's profile Send private message
kolban
PostPosted: Wed Oct 30, 2002 2:04 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

Unfortunately, I have seen this kind of error before. If the message on the queue "kind of looks like" and MQRFH2 message than "kind of looks like" a JMS/MQ formatted message, such an error can occur. Can you do an "amqsbcg" dump of the messages in the queue and lets see what the next one looks like?
Back to top
View user's profile Send private message
zhaobin
PostPosted: Thu Oct 31, 2002 4:59 pm    Post subject: Reply with quote

Novice

Joined: 29 Oct 2002
Posts: 20

Thanks for the inputs.

I cannot reliably reproduce the problem. The error just happened once, but once it happened, the JMS program cannot receive any of the messages unless I cleared the queue. Since the problem was urgent, I didn't have a chance to use "amqsbcg" to browse the queue before I cleared it. I will do that if the error happen again.

kolban, you encountered the same error before? What's your workaround besides clearing up the whole queue? Has it been reported to IBM as a bug and is there any fix from IBM?

Does anyone know how I can report a Java for MQ bug to IBM?

thanks
Back to top
View user's profile Send private message
bower5932
PostPosted: Fri Nov 01, 2002 9:23 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

When you got your copy of MQSeries, you should have been given some kind of information regarding support - part of which should be a phone number. You ought to be able to call the number and open a problem. However, I can tell you that IBM will want some kind of recreate scenario. If you have code that reliably reproduces the problem, you'll increase the response time in getting the problem fixed.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Null Pointer in receiveNoWait() in Java for MQ
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.