[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-users
Subject:    Re: ObjectMessage looses object
From:       "James Strachan" <james.strachan () gmail ! com>
Date:       2007-11-28 11:10:05
Message-ID: ec6e67fd0711280310o1e3cc865jf95c362bb9f18090 () mail ! gmail ! com
[Download RAW message or body]

The error looks like an issue for the consumer side. Does the consumer
have the PingMessage class on its classpath with the same version as
the sender?

On 28/11/2007, transduktor <transduktor@web.de> wrote:
> 
> Hello,
> 
> thank you for your time. I have no idea what I can do next.
> i try to send an ObjectMessage with a Serializable Object. this works fine
> if I run my tests in "batch"-mode, but if I do the same in an eclipse
> plugin, I revieve the message, but getObject()
> throws an Exception.
> 
> thank you
> 
> Thomas
> 
> 
> this is what I do:
> 
> the connection:
> ActiveMQConnectionFactory connectionFactory = new
> ActiveMQConnectionFactory(user, password, url);
> connection = connectionFactory.createConnection(user, password);
> connection.start();
> session =connection..createSession(false,Session.AUTO_ACKNOWLEDGE);
> queue = session.createQueue(destinationName);
> producer = session.createProducer(queue);
> ObjectMessage message = session.createObjectMessage(msg);
> producer.send(message);
> 
> the exception:
> 
> javax.jms.JMSException: Failed to build body from bytes. Reason:
> java.io.IOException: PingMessage
> at
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:33)
> at
> org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:172)
>  at MyMessageListener.onMessage(MyMessageListener.java:41)
> at
> org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:854)
>  at
> org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:99)
>  at
> org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:166)
>  at
> org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:117)
> at
> org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java:26)
> at
> org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:44)
> at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>  at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>  at java.lang.Thread.run(Thread.java:619)
> Caused by: java.io.IOException: PingMessage
> at
> org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:168)
>                 
> ... 10 more
> --
> View this message in context: \
> http://www.nabble.com/ObjectMessage-looses-object-tf4887730s2354.html#a13989976 \
> Sent from the ActiveMQ - User mailing list archive at Nabble.com. 
> 


-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic