Hi, try to convert the body to something that implements serializable (e.g. String), after the log endpoint. It seems that the log endpoint converts the body to a ByteArrayInputStream, which is not serializable.
Regards, Mitko From: Francois Lefoll <[email protected]> To: [email protected] Date: 21.06.2010 15:47 Subject: camel-activemq unable to serialize Body after camel-exec usage Hi, I got a simple testcase: activemq->exec->activemq. as exec, I will only use /bin/more (ie: copy stdin into stdout...) this fails : <camel:route> <camel:from uri="activemq:queue:queue1"/> <camel:to uri="exec:/bin/more"/> <camel:to uri="log:myLogger"/> <camel:to uri="activemq:queue:queue2"/> </camel:route> Jun 21, 2010 3:35:35 PM org.apache.camel.component.exec.ExecProducer process INFO: Executing ExecCommand [args=[], executable=/bin/more, timeout=9223372036854775807, outFile=null, workingDir=null, useStderrOnEmptyStdout=false] Jun 21, 2010 3:35:36 PM org.apache.camel.component.exec.ExecProducer process INFO: The command ExecCommand [args=[], executable=/bin/more, timeout=9223372036854775807, outFile=null, workingDir=null, useStderrOnEmptyStdout=false] had exit value 0 Jun 21, 2010 3:35:36 PM org.apache.camel.processor.Logger process INFO: Exchange[ExchangePattern:InOnly, BodyType:org.apache.camel.component.exec.ExecResult, Body:<emptyMessage/>] Jun 21, 2010 3:35:36 PM org.apache.camel.processor.Logger log SEVERE: Failed delivery for exchangeId: ID:user-laptop-44928-1277111283287-2:10:1:1:31. Exhausted after delivery attempt: 1 caught: java.lang.RuntimeException: java.io.ByteArrayInputStream java.lang.RuntimeException: java.io.ByteArrayInputStream at org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:104) at org.apache.activemq.command.ActiveMQObjectMessage.setObject(ActiveMQObjectMessage.java:155) at org.apache.activemq.ActiveMQSession.createObjectMessage(ActiveMQSession.java:378) at org.apache.activemq.pool.PooledSession.createObjectMessage(PooledSession.java:153) ... Caused by: java.io.NotSerializableException: java.io.ByteArrayInputStream at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) ... Did I miss something ? Thanks for your help, Regards, Francois -- View this message in context: http://camel.465427.n5.nabble.com/camel-activemq-unable-to-serialize-Body-after-camel-exec-usage-tp510418p510418.html Sent from the Camel - Users mailing list archive at Nabble.com. InterComponentWare AG: Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler / Aufsichtsratsvors.: Prof. Dr. Christof Hettich Firmensitz: 69190 Walldorf, Altrottstraße 31 / AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516
