RE: javax.jms.MessageFormatException
BHansard-OwnAfhDu3djtGJWAWb0rHTP0h3Fy0YSOAL8bYrjMMd8@public.gmane.org
| Newsgroups | gmane.comp.java.openjms.user |
|---|---|
| Message-ID | <OFEEBD07E8.5BC6968F-ON85257035.004B56B6-85257035.004BDDFD@powersystems.rockwell.com> |
The Sender and Receiver are running under two seperate JVMs
Here is a sample of the stack using the code you provided:
java.lang.ClassNotFoundException: com.rockwell.powersystems.beans.BeanUser
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:844)
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:709)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:574)
at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1538)
at
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at
org.exolab.jms.message.ObjectMessageImpl.getObject(ObjectMessageImpl.java:215)
This would appear to be a class path issue. I added a line of code to test
the classpath just before the message.getObject();:
com.rockwell.powersystems.beans.BeanUser testUser = new
com.rockwell.powersystems.beans.BeanUser()
logger.info("Test User: " + testUser);
2005-07-05 09:07:45,101 INFO com.rockwell.amts.actions.RetrieveUserProfile
- Test User: com.rockwell.powersystems.beans.BeanUser@113cd63
The only thing I can think is the the multiple JVM is causing a signature
issue on the class under Linux.
"Tim Anderson"
<[email protected]
.au> To
Sent by: <openjms-user-5NWGOfrQmneRv+LV9MX5uuRhgaa4a2kL@public.gmane.orgnet
openjms-user-admi >
[email protected] cc
ge.net
Subject
RE: [openjms-user]
07/02/2005 11:44 javax.jms.MessageFormatException
PM
Please respond to
openjms-user@list
s.sourceforge.net
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?
graycol.gif
(image/gif, 105 B) - not displayed
pic11643.gif
(image/gif, 1.2 KB) - not displayed
ecblank.gif
(image/gif, 45 B) - not displayed