Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RE: Receiveing ObjectMessage in JMS

 
Syed Saifuddin
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I want to develop message layer for application to exchange text and serialized object using JMS. The application is working well when TextMessage is passed but throw exception when object message is passed.
My code is :
try {
correlationID = mess.getJMSCorrelationID();
System.out.println(LID +" correlationID = "+correlationID);
if(mess instanceof ObjectMessage) {
oMessages = (ObjectMessage) mess;
System.out.println(LID + "mess instanceof ObjectMessage");
}
r16 = (R16) oMessages.getObject();//fail here
} catch(JMSException jmse){
jmse.printStackTrace();
Logger.debug( LID , jmse );
}

And the exception is :
javax.jms.MessageFormatException: Error in Deserializing Object Message.Class not found

Please share your experience with me
Thanks in Advance
[ February 11, 2004: Message edited by: Syed Saifuddin ]
 
Todor Mollov
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is your class R16 serializable ?
 
Syed Saifuddin
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
R16 is Serializable than what to do
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To me, this
avax.jms.MessageFormatException: Error in Deserializing Object Message.Class not found
says that your receiving program does not have access to the class definition.
Does it really say Object Message.class not found ? with a space between Object and Message?
Bill
 
Syed Saifuddin
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden you guess the right problem but please give the solution
thankyou
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic