You cannot change error handler using adviceWith as the exception
message tell you.
Its a limitation in the routing engine. We will improve that in Camel
3.0 to make it fully dynamic.



On Mon, Apr 11, 2011 at 11:43 PM, jpalmer1026 <palmer1...@gmail.com> wrote:
> I'd like to specify a context-scoped error handler in a Spring XML file to
> declare a default error handler. When I configure the handler by using an
> errorHandlerRef attribute on the camelContext tag, I'm getting the following
> exception when I try to test the handler from a CamelSpringTestSupportClass:
>
> java.lang.IllegalArgumentException: You can not advice with error handlers.
> Remove the error handlers from the route builder.
>
> If instead of configuring a context-scoped default error handler, I declare
> a route-scoped error handler by using an errorHandlerRef attribute on the
> route tag, everything works as expected.
>
> Is there a reason why I'm unable to configure a default handler by using an
> errorHandlerRef attribute on the camelContext tag and then test it from a
> CamelSpringTestSupportClass?
>
> Thanks!
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Error-Handling-with-Spring-XML-tp4296920p4296920.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to