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 » EOFExceptions when pulling message of the queue

Post new topic  Reply to topic
 EOFExceptions when pulling message of the queue « View previous topic :: View next topic » 
Author Message
steffi2
PostPosted: Mon May 03, 2010 5:08 pm    Post subject: EOFExceptions when pulling message of the queue Reply with quote

Apprentice

Joined: 04 Sep 2009
Posts: 31

Occasionally our MessageListeners are having an issue where sometimes when we pull a message off the queue we see a LinkException that says that an EOFException has occurred

Using the stack reported by the listener is essentially readInt in Msg2 whereby it's seeing an EOFException instead of something that is infact in an int.

Also occasionally we see within what should be "text" ie. xml the following

RFH ^@^@^@^B^@^@^@?^@^@^A^Q^@^@^D?MQHRF2 ^@^@^@^@
^@^@^D?^@^@^@

This is the stack without the Linked Exception

Only the new code has the Linked Exception but it's basically an EOFException during readInt

javax.jms.JMSException: MQJMS1000: Failed to create JMS message
at com.ibm.mq.jms.services.ConfigEnvironment.newException(Config
Environment.java:540)
at com.ibm.mq.jms.MQQueueReceiver.getMessage(MQQueueReceiver.jav
a:1740)
at com.ibm.mq.jms.MQQueueReceiver.receiveAsync(MQQueueReceiver.j
ava:828)
at com.ibm.mq.jms.contact admin.run(contact admin.java
:401)
at java.lang.Thread.run(Thread.java:619)

These are the jars in use by the process with the Message Listener

jms-1.1.jar
mq-6.000.jar
mqjms-1.0.2b.jar
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 04, 2010 2:17 pm    Post subject: Re: EOFExceptions when pulling message of the queue Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

steffi2 wrote:
Occasionally our MessageListeners are having an issue where sometimes when we pull a message off the queue we see a LinkException that says that an EOFException has occurred

Using the stack reported by the listener is essentially readInt in Msg2 whereby it's seeing an EOFException instead of something that is infact in an int.

Sounds to me like you might have a message content that does not match your expectations. Are you using JMS or MQbase?

steffi2 wrote:
Also occasionally we see within what should be "text" ie. xml the following

RFH ^@^@^@^B^@^@^@?^@^@^A^Q^@^@^D?MQHRF2 ^@^@^@^@
^@^@^D?^@^@^@

This is the stack without the Linked Exception

Only the new code has the Linked Exception but it's basically an EOFException during readInt

javax.jms.JMSException: MQJMS1000: Failed to create JMS message
at com.ibm.mq.jms.services.ConfigEnvironment.newException(Config
Environment.java:540)
at com.ibm.mq.jms.MQQueueReceiver.getMessage(MQQueueReceiver.jav
a:1740)
at com.ibm.mq.jms.MQQueueReceiver.receiveAsync(MQQueueReceiver.j
ava:828)
at com.ibm.mq.jms.contact admin.run(contact admin.java
:401)
at java.lang.Thread.run(Thread.java:619)

These are the jars in use by the process with the Message Listener

jms-1.1.jar
mq-6.000.jar
mqjms-1.0.2b.jar

From what you are saying you would be using JMS here. One of the reasons you might be seeing an RFH header in the payload when using JMS is because of a poorly formatted message. The MQMD should indicate that the next header is an RFH (see values in constants) and the RFH will then indicate the content/format of the next part (header or payload).

This usually happens when a message is being built with an RFH header by a non JMS app and read by a JMS app, but the non JMS app did miss some of the important finer points in its build process....

If using JMS on MQ 7 make sure you are in V6 compatible mode.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
steffi2
PostPosted: Tue May 04, 2010 4:24 pm    Post subject: Reply with quote

Apprentice

Joined: 04 Sep 2009
Posts: 31

Here's the actual backtrace I get and I can tell you that on this occasion the sender is JMS as well as the consumer.

Linked exception
java.io.EOFException
at com.ibm.mq.MQMsg2.readInt(MQMsg2.java:1964)
at com.ibm.mq.jms.MQJMSMessage.createJMSMessage(MQJMSMessage.java:325)
at com.ibm.mq.jms.MQQueueReceiver.getMessage(MQQueueReceiver.java:1670)
at com.ibm.mq.jms.MQQueueReceiver.receiveAsync(MQQueueReceiver.java:828)
at com.ibm.mq.jms.contact admin.run(contact admin.java:401)
at java.lang.Thread.run(Thread.java:619)
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed May 05, 2010 6:56 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

steffi2 wrote:
Here's the actual backtrace I get and I can tell you that on this occasion the sender is JMS as well as the consumer.

Linked exception
java.io.EOFException
at com.ibm.mq.MQMsg2.readInt(MQMsg2.java:1964)
at com.ibm.mq.jms.MQJMSMessage.createJMSMessage(MQJMSMessage.java:325)
at com.ibm.mq.jms.MQQueueReceiver.getMessage(MQQueueReceiver.java:1670)
at com.ibm.mq.jms.MQQueueReceiver.receiveAsync(MQQueueReceiver.java:828)
at com.ibm.mq.jms.contact admin.run(contact admin.java:401)
at java.lang.Thread.run(Thread.java:619)


A little bit more context would probably have helped a lot more.

What this looks like to me is that you are trying to get the value from a JMSMap message? Have you checked using getMapNames or itemexists that the name you are trying to retrieve the value for really exists? Can you also please check the type of the object?
It still looks to me that you may not be getting the content you expected. To be completely sure we would probably need to see both the code used to generate and the code used to read the message...

Can you inspect the message using RFHUtil(c) on the queue before receiving it?

The exception per se says very little...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » EOFExceptions when pulling message of the queue
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.