Object Message (Value Object) in Server classpath
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Croff_Mat
Posted On:   Tuesday, January 10, 2006 09:55 AM

Hi, I am sending an JMS object message (which a value object) to a Queue and and MDB picks up and processes the message. Here the sender and receiver can be in different servers. In the onMessage, at MyValueObject myObj = (MyValueObject) objMsg.getObject(), I am getting the following error. >>> javax.jms.MessageFormatException: MQJMS1061: Unable to deserialize object >>> at com.ibm.jms.JMSMessage.newMessageFormatException(JMSMessage.java:4720) >>> at com.ibm.jms.JMSObjectMessage.getObject(JMSObjectMessage.java:264) But, if I keep a jar file in the server classpath in my WSAD, which contains this value objec   More>>

Hi,

I am sending an JMS object message (which a value object) to a Queue and and MDB picks up and processes the message. Here the sender and receiver can be in different servers.



In the onMessage, at MyValueObject myObj = (MyValueObject) objMsg.getObject(), I am getting the following error.





>>> javax.jms.MessageFormatException: MQJMS1061: Unable to deserialize object


>>> at com.ibm.jms.JMSMessage.newMessageFormatException(JMSMessage.java:4720)


>>> at com.ibm.jms.JMSObjectMessage.getObject(JMSObjectMessage.java:264)



But, if I keep a jar file in the server classpath in my WSAD, which contains this value object. It is working fine.



Please suggest me, is this better way of doing for production also or is there any better way of doing this.




Thanks in advance.

   <<Less

Re: Object Message (Value Object) in Server classpath

Posted By:   Anonymous  
Posted On:   Wednesday, January 11, 2006 03:35 AM

When you need to deserialize an Object that particular class file should be there in the class path. So the solution you have found for the problem is correct. So when you want to do this in a standard way you have to create a new Java Application project which is a helper project and include it in both the servers.
About | Sitemap | Contact