RE: javax.jms.MessageFormatException

"Tim Anderson" <[email protected]>
Newsgroups gmane.comp.java.openjms.user
Message-ID <[email protected]>
The object is failing to deserialize.
Have you included the bean and its dependencies in your classpath
on the Linux client? Not clear from your post if the sender and receiver
are in the same JVM.
 
You can get the root cause of the problem by:
try {
    Object obj = message.getObject();
} catch (JMSException e) {
    e.getLinkedException().printStackTrace();
}
 
-Tim
 



  _____  

From: openjms-user-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:openjms-user-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of
BHansard-OwnAfhDu3djtGJWAWb0rHTP0h3Fy0YSOAL8bYrjMMd8@public.gmane.org
Sent: Saturday, 2 July 2005 1:18 AM
To: [email protected]
Subject: [openjms-user] javax.jms.MessageFormatException



Hello all,

I have a quick question. I am running OpenJMS 0.7.6.1 on a RedHat Enterprise
Linux Server w Java 1.5. 

I have a JavaBean defined as:

public class XyzBean extends Object implements Serializable

I place the Bean on a Queue using the 

ObjectMessage msg = session.createObjectMessage(xyzBean );

I retrieve the message with:

QueueReceiver reciever = session.createReceiver(queue, selector);
ObjectMessage message = (ObjectMessage) reciever.receive(2000);
XyzBean xyzBean = (XyzBean) message.getObject();

However this will throw a javax.jms.MessageFormatException: package.Xyzbean
error

I run the same code on a Windows 2000 Server running Java 1.5 and OpenJMS
0.7.6.1 and it works without a problem.

Does anyone know what might be causing this issue on the Linux Machine?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.