[jdom-interest] Messaging: JMS Unable to Serialize Document

Steve Morris steve.morris at nwa.com
Tue Oct 17 13:57:31 PDT 2000

I'm having difficulty sending JDOM XML Documents to MQSeries queues via Java
Messaging Service (JMS).

I have a javax.jms.ObjectMessage defined as...

> ObjectMessage myMessage;

When I try to call the its setObject method, providing my JDOM Document as
the argument...

> myMessage.setObject(myDocument);

JMS throws the following....

> javax.jms.MessageFormatException:
> MQJMS1060: Unable to serialize object

Here's a link to the javax.jms.ObjectMessage where
setObject(java.io.Serializable object) is defined...

> http://java.sun.com/products/jms/javadoc-102a/javax/jms/ObjectMessage.html

Doesn't org.jdom.Document implement serializable?
When I send other types of Objects such as...

> String myString = "A String in an Object";

> myMessage.setObject(myString);

it works ok.

What am I missing?


More information about the jdom-interest mailing list