File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes RE: Receiveing ObjectMessage in JMS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "RE: Receiveing ObjectMessage in JMS " Watch "RE: Receiveing ObjectMessage in JMS " New topic
Author

RE: Receiveing ObjectMessage in JMS

Syed Saifuddin
Ranch Hand

Joined: Sep 01, 2003
Posts: 130
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 ]

Thank You & Best Regards,

Syed Saifuddin,
Senior Software Engineer

SAP Oracle AIX & Java Training
http://www.socialinet.com
Todor Mollov
Ranch Hand

Joined: Jan 13, 2004
Posts: 30
Is your class R16 serializable ?
Syed Saifuddin
Ranch Hand

Joined: Sep 01, 2003
Posts: 130
R16 is Serializable than what to do
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12789
    
    5
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

Joined: Sep 01, 2003
Posts: 130
William Brogden you guess the right problem but please give the solution
thankyou
 
 
subject: RE: Receiveing ObjectMessage in JMS