9 Replies Latest reply on Jun 1, 2011 3:30 AM by davsclaus

    Problem - Bug with split and activemq with transferExchange=true

    dherla

      Hello,

       

      I use the following version : apache-servicemix-4.3.1-fuse-01-09

       

      I have a problem with the split when i send the result to activemq with the option "transferExchange".

       

      I have the following route (very simple) :

      from("timer://test-split?period=10000&delay=10000")

      .routeId("test-split")

      .setBody(constant("A,B,C"))

      .split(body().tokenize(","))

      //.to("activemq:test-split?transferExchange=true");

      .to("activemq:test-split");

       

      without "transferExchange=true", there is no problem. I have three message in the queue with the following body ("A", "B", "C"). It's good

       

      But with "transferExchange=true", i have the following exception :

      14:16:58,197 | ERROR | test-split       | DefaultErrorHandler              | 68 - org.apache.camel.camel-core - 2.6.0.fuse-01-09 | Failed delivery for exchangeId: ID-FUSE43-1044-1306402551538-8-3. Exhausted after delivery attempt: 1 caught: java.lang.RuntimeException: org.apache.camel.processor.Splitter

       

      java.lang.RuntimeException: org.apache.camel.processor.Splitter

           at org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:111)[43:org.apache.activemq.activemq-core:5.4.2.fuse-03-09]

           at org.apache.activemq.command.ActiveMQObjectMessage.setObject(Acti

      Caused by: java.io.NotSerializableException: org.apache.camel.processor.Splitter

           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)[:1.6.0_21]

           at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)[:1.6.0_21]

       

      I don't understand why. Maybe a bug ?

       

      Any help will be very interesting.

       

      Thanks in advance

       

      Dimitri