Hi

What runtime are you using to run Camel, and it looks like your route
xml files are not spring xml files, but loaded via the new xml loader.
And if so then its a clue to it being the problem.

On Fri, Apr 9, 2021 at 10:10 AM HOEFLAKEN Jacob
<jacob.hoefla...@axians.com.invalid> wrote:
>
> Hi,
>
> I cannot add a doCatch anymore in the XML DSL since 3.8.0+.
>
> <routes xmlns="http://camel.apache.org/schema/spring";
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>         xsi:schemaLocation="http://camel.apache.org/schema/spring 
> https://camel.apache.org/schema/spring/camel-spring.xsd";>
>
>     <route>
>         <from uri="direct:start"  />
>         <doTry>
>             <to uri="log:try" />
>             <doCatch>
>                 <exception>java.lang.RuntimeException</exception>
>                 <to uri="log:catch" />
>             </doCatch>
>         </doTry>
>     </route>
> </routes>
>
> I gives me an error:
>
> java.lang.IllegalArgumentException: This doCatch should have a doTry as its 
> parent on DoCatch[ [class java.lang.RuntimeException] -> [To[log:catch]]]
>
> See also 
> https://stackoverflow.com/questions/66635970/cannot-configure-docatch-block-in-camel-3-8-0-xml
>
>
> Met vriendelijke groet / Kind regards,
>
> Jacob



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to