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 IndexIBM MQ Java / JMSjava.lang.ClassCastException: com.ibm.jms.JMSBytesMessage

Post new topicReply to topic
java.lang.ClassCastException: com.ibm.jms.JMSBytesMessage View previous topic :: View next topic
Author Message
riteshgoel
PostPosted: Thu Apr 05, 2007 1:13 am Post subject: java.lang.ClassCastException: com.ibm.jms.JMSBytesMessage Reply with quote

Newbie

Joined: 05 Apr 2007
Posts: 1

Hi Guys,

In WAS 5.1 admin console, the TargetClient value set to “JMS”. The xml message is something <?xml version="1.0"?>.....

Now when we drop the message we are getting java.lang.ClassCastException: com.ibm.jms.JMSBytesMessage at the method
message= ((TextMessage)_message).getText();

ITs working in one enivronment and failing in other env both same) help me to solve this issue.
Back to top
View user's profile Send private message
BenR
PostPosted: Thu Apr 05, 2007 3:04 am Post subject: Reply with quote

Acolyte

Joined: 31 Jan 2006
Posts: 60
Location: Hursley, UK

The ClassCastException is telling you that you received a BytesMessage, but you're trying to cast it to a TextMessage - you can't do that. Is another application putting messages to the same queue?
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Thu Apr 05, 2007 3:18 am Post subject: Reply with quote

Grand High Poobah

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

Make sure the sending application only sends a javax.jms.TextMessage or the legacy app has set the format to MQFMT_STRING on the mqmd.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ Java / JMSjava.lang.ClassCastException: com.ibm.jms.JMSBytesMessage
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.