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 < > clemens@ > > 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.