I am trying to trap errors thrown in camel and am running into a bit of an issue with nested errors. For example:
org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader. at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:237)[133:org.apache.cxf.bundle:2.4.3.fuse-00-13] at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60)[133:org.apache.cxf.bundle:2.4.3.fuse-00-13] at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[133:org.apache.cxf.bundle:2.4.3.fuse-00-13] at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:779)[133:org.apache.cxf.bundle:2.4.3.fuse-00-13] at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1626)[133:org.apache.cxf.bundle:2.4.3.fuse-00-13] at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1498)[133:org.apache.cxf.bundle:2.4.3.fuse-00-13] at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:353)[133:org.apache.cxf.bundle:2.4.3.fuse-00-13] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_23] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_23] at java.lang.Thread.run(Thread.java:662)[:1.6.0_23] Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,0] at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:677)[127:woodstox-core-asl:4.1.1] at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2104)[127:woodstox-core-asl:4.1.1] at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2010)[127:woodstox-core-asl:4.1.1] at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1102)[127:woodstox-core-asl:4.1.1] at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1125)[127:woodstox-core-asl:4.1.1] at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:138)[133:org.apache.cxf.bundle:2.4.3.fuse-00-13] ... 9 more I know I can catch this error in the camel spring DSL using something like <onException> <exception>org.apache.cxf.interceptor.Fault</exception> <redeliveryPolicy maximumRedeliveries="0" /> <handled><constant>true</constant></handled> <log message="CXF Fault" loggingLevel="ERROR"/> </onException> But obviously that is a fairly generic case of a soap fault error being thrown by cxf, and I'd actually want to catch the more specific error, in this case com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog. I have tried adding an onException block for that error, but for some reason when I attempt to deploy it it gives me a class not found error on com.ctc.wstx.exc.WstxEOFException. I have included the org.codehaus.woodstox/woodstox-core-asl in my POM and made sure the osgi bundle imports the com.ctc.wstx.exc package, but for some reason it can not work out this dependency. Am I doing something obvious improperly? Is there a different method I should go about trying to trap route errors? -- View this message in context: http://camel.465427.n5.nabble.com/Trapping-Errors-Help-tp5633932p5633932.html Sent from the Camel - Users mailing list archive at Nabble.com.