RE: javax.jms.MessageFormatException
BHansard-OwnAfhDu3djtGJWAWb0rHTP0h3Fy0YSOAL8bYrjMMd8@public.gmane.org
| Newsgroups | gmane.comp.java.openjms.user |
|---|---|
| Message-ID | <OF008B56C7.2F937DFE-ON85257035.0052A23E-85257035.0052BF1E@powersystems.rockwell.com> |
That worked. I had the openjms client jar under the common folder in
tomcat. I moved it to the lib folder for each of the applications and it
works.
"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/05/2005 10:01 javax.jms.MessageFormatException
AM
Please respond to
openjms-user@list
s.sourceforge.net
I suspect the problem is occurring because the openjms client jar is in a
different
class loader to that of your app. If you include the client jar in your
webapp, along with
the jar containing BeanUser, the problem should go away.
-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: Tuesday, 5 July 2005 11:49 PM
To: [email protected]
Cc: [email protected];
openjms-user-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: RE: [openjms-user] javax.jms.MessageFormatException
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.
Inactive hide details for "Tim Anderson" <[email protected]>"Tim
Anderson" <[email protected]>
"Tim Anderson"
<[email protected]
et.au>
Sent by:
openjms-user-ad To
[email protected]
eforge.net <[email protected]
rceforge.net>
07/02/2005 cc
11:44 PM
Subject
Please respond to
[email protected] RE: [openjms-user]
javax.jms.MessageFormat
Exception
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
pic18598.gif
(image/gif, 1.2 KB) - not displayed
ecblank.gif
(image/gif, 45 B) - not displayed
C8269263.gif
(image/gif, 105 B) - not displayed
C1629127.gif
(image/gif, 45 B) - not displayed
C4338848.gif
(image/gif, 45 B) - not displayed
C4755000.gif
(image/gif, 45 B) - not displayed
C2207374.gif
(image/gif, 45 B) - not displayed
C7380806.gif
(image/gif, 45 B) - not displayed
C3904684.gif
(image/gif, 45 B) - not displayed
C8165110.gif
(image/gif, 45 B) - not displayed
C1411595.gif
(image/gif, 45 B) - not displayed