You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Jordi Soucheiron <jo...@soucheiron.cat> on 2008/12/07 02:42:53 UTC

JMS serialization problem

Hi everyone,
I'm quite new using ActiveMQ. I've been trying to send a java object through
a queue and I get a javax.jms.JMSException: Failed to build body from bytes.
Reason: java.io.IOException:
I've found this bug (https://issues.apache.org/activemq/browse/AMQ-1588),
but I don't know if my problem is because of this bug or if I'm doing
something wrong.
Does anyone know how could I start debugging?
Thanks :)

Re: JMS serialization problem

Posted by Lars Eirik Rønning <la...@gmail.com>.
Make sure that your personal code also is the same on both sides..
In the case where you export a jar file your self, you have to have the same
version of the class on both clientside and serverside.. Not sure if this is
relevant in your case though..

On Sun, Dec 7, 2008 at 12:15 PM, Jordi Soucheiron <jo...@soucheiron.cat>wrote:

> The client and the producer are running from the same computer and they are
> using the same jar (Activemq-5.3-snapshot.jar).
> I've used activemq-5.1 and the last snapshot of activemq-5.3 with the same
> results
>
> 2008/12/7 Mark Webb <el...@gmail.com>
>
> > I saw that once and it was a deserialization problem.  I fixed it by
> > placing the same set of jar files on both sender and receiver.  The
> > issue was that ActiveMQ was swallowing a ClassNotFoundException and
> > re-throwing it as a JMSException.  I only found it by stepping through
> > the code in a debugger.
> >
> >
> >
> > On Sat, Dec 6, 2008 at 8:42 PM, Jordi Soucheiron <jo...@soucheiron.cat>
> > wrote:
> > > Hi everyone,
> > > I'm quite new using ActiveMQ. I've been trying to send a java object
> > through
> > > a queue and I get a javax.jms.JMSException: Failed to build body from
> > bytes.
> > > Reason: java.io.IOException:
> > > I've found this bug (
> https://issues.apache.org/activemq/browse/AMQ-1588
> > ),
> > > but I don't know if my problem is because of this bug or if I'm doing
> > > something wrong.
> > > Does anyone know how could I start debugging?
> > > Thanks :)
> > >
> >
>

Re: JMS serialization problem

Posted by Jordi Soucheiron <jo...@soucheiron.cat>.
The client and the producer are running from the same computer and they are
using the same jar (Activemq-5.3-snapshot.jar).
I've used activemq-5.1 and the last snapshot of activemq-5.3 with the same
results

2008/12/7 Mark Webb <el...@gmail.com>

> I saw that once and it was a deserialization problem.  I fixed it by
> placing the same set of jar files on both sender and receiver.  The
> issue was that ActiveMQ was swallowing a ClassNotFoundException and
> re-throwing it as a JMSException.  I only found it by stepping through
> the code in a debugger.
>
>
>
> On Sat, Dec 6, 2008 at 8:42 PM, Jordi Soucheiron <jo...@soucheiron.cat>
> wrote:
> > Hi everyone,
> > I'm quite new using ActiveMQ. I've been trying to send a java object
> through
> > a queue and I get a javax.jms.JMSException: Failed to build body from
> bytes.
> > Reason: java.io.IOException:
> > I've found this bug (https://issues.apache.org/activemq/browse/AMQ-1588
> ),
> > but I don't know if my problem is because of this bug or if I'm doing
> > something wrong.
> > Does anyone know how could I start debugging?
> > Thanks :)
> >
>

Re: JMS serialization problem

Posted by Mark Webb <el...@gmail.com>.
I saw that once and it was a deserialization problem.  I fixed it by
placing the same set of jar files on both sender and receiver.  The
issue was that ActiveMQ was swallowing a ClassNotFoundException and
re-throwing it as a JMSException.  I only found it by stepping through
the code in a debugger.



On Sat, Dec 6, 2008 at 8:42 PM, Jordi Soucheiron <jo...@soucheiron.cat> wrote:
> Hi everyone,
> I'm quite new using ActiveMQ. I've been trying to send a java object through
> a queue and I get a javax.jms.JMSException: Failed to build body from bytes.
> Reason: java.io.IOException:
> I've found this bug (https://issues.apache.org/activemq/browse/AMQ-1588),
> but I don't know if my problem is because of this bug or if I'm doing
> something wrong.
> Does anyone know how could I start debugging?
> Thanks :)
>