Hi Sergey, Thanks for your response!
Somehow onException was not setting the exception object on header. As you mentioned it should be a core camel issue. To get the exception object I had manually set a header as follows... <camel:onException> <camel:exception>java.lang.Exception</camel:exception> <camel:handled><camel:constant>true</camel:constant></camel:handled> <camel:log message="The caught exception is: ${exception.message}"></camel:log> <camel:setHeader headerName="caughtException"><camel:simple>${exception}</camel:simple></camel:setHeader> <camel:process ref="faultProcessor"/> </camel:onException> Also to catch the exception thrown by CXF I used exception mapper as follows... <jaxrs:server id="restServer"> <jaxrs:serviceBeans> <ref bean="reratingServices"/> </jaxrs:serviceBeans> <jaxrs:providers> <ref bean="cxfExceptionMapper"/> </jaxrs:providers> </jaxrs:server> This works fine. But to use jaxrs component I had to add cxf-bundle-jaxrs in my dependencies. Now cxf-bundle-jaxrs contains jetty jars and trying to run embedded jetty server on top of my external jetty container. I tried to exclude the jetty jars from dependency but it did not help and I was getting ServiceConstructionException. Any idea how use jaxrs component within external jetty container. The CXF doc http://cxf.apache.org/docs/jax-rs.html does not provide much insight on that. Regards, Bijoy -- View this message in context: http://camel.465427.n5.nabble.com/onException-issues-with-cxfrs-tp5750099p5750298.html Sent from the Camel - Users mailing list archive at Nabble.com.