I suggest you clean up the exchange properties before trying to marshall the properties. From the stack trace, it looks like there are some trouble to marshall the CXF XMLMessage which could be store into the exchange properties.
-- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Monday, July 22, 2013 at 6:42 PM, Martin Stiborský wrote: > Fortunately I can solve the problem with kind of workaround - not passing > exchange to JMS and use just Exchange headers. That works for me. > Anyway i'd like to know what is wrong with the transferExchange=true > solution. > > > On Mon, Jul 22, 2013 at 12:01 PM, Martin Stiborský < > [email protected] (mailto:[email protected])> wrote: > > > Hello guys, > > I have a route, where List from Exchange body is splitted and each item is > > sent to JMS, the main route waits for response, performs some more > > transformation and then continue with next item from the list in the same > > way. > > All the response are aggregated into another list, which is processed once > > the splitter get its job done. > > > > In the JMS route, I need to use some Exchange properties, so I used > > tranferExchange=true option for both JMS producer and consumer endpoint. > > > > But I have strange problem there, sometime it works, sometimes not and the > > NPE exception is raised. > > I can't find the wrong point, it seems that the problem is with properties > > when transferring the exchange to JMS route. > > > > I broke the code into smaller pieces and wrote some unit tests to locate > > the problem. > > Here is link to the test, the routes there describes what I'm doing, in > > simplified version: > > https://gist.github.com/stibi/6052674 > > > > Here is the jaxrs service resource class: > > https://gist.github.com/stibi/6052697 > > > > Could you guys try to run the test? > > Or if you spot something completely wrong there, please let me know. > > > > Sometimes the route works, the second test pass green (the first one > > without transferring the exchange always pass), but sometimes this > > exception occur: > > https://gist.github.com/stibi/6052726 > > > > I'm running Camel 2.11.0. Maybe it could be related to this issues: > > https://issues.apache.org/jira/browse/CAMEL-6218 > > > > -- > > S pozdravem / Best regards > > Martin Stiborský > > > > Jabber: [email protected] (mailto:[email protected]) > > Twitter: http://www.twitter.com/stibi > > > > > > -- > S pozdravem / Best regards > Martin Stiborský > > Jabber: [email protected] (mailto:[email protected]) > Twitter: http://www.twitter.com/stibi
