camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Upgrade to 2.16.0
Date Wed, 28 Oct 2015 09:12:16 GMT
Hi

You surely need to add <filter> in the route. Having <when> standalone
is not intended. So do

See filter
http://camel.apache.org/message-filter.html

On Wed, Oct 28, 2015 at 10:06 AM, Clemens <clemens@imendo.at> wrote:
> Hi,
>
> Sample camel route that will throw "ClassCastException:
> org.apache.camel.model.WhenDefinition cannot be cast to
> org.apache.camel.model.FilterDefinition" at
> DefaultManagementObjectStragety#310.
>
> <route id="sample">
>   <from uri="direct:start">
>
>   <when>
>     <simple>${body} != null</simple>
>     <bean ref="myBean" method="myMethod">
>   </when>
> </route>
>
>
>
>
>
>
>
>
>
>
>
> Claus Ibsen-2 wrote
>> Can anyone show some route code with this problem.
>>
>> On Sat, Oct 24, 2015 at 11:55 AM, Clemens &lt;
>
>> clemens@
>
>> &gt; wrote:
>>> Hi,
>>>
>>> I had the same ClassCaseException When To Filter after upgrading to
>>> 2.16.0.
>>> Seems like in 2.16
>> <when>
>>  is only allowed inside
>> <choice>
>> . Outside
>> <choice>
>>> you must use
>> <filter>
>> . Prior to 2.16 it was ok to use when outside
>> <choice>
>>> .......
>>>
>>> View this message in context:
>>> http://camel.465427.n5.nabble.com/Upgrade-to-2-16-0-tp5772570p5773020.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Upgrade-to-2-16-0-tp5772570p5773136.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition:
https://www.manning.com/books/camel-in-action-second-edition

Mime
View raw message