Hi I am having the same issue in camel version 2.10.2. The route below throws
exception

from("jpa:org.example.SystemProperty?consumeDelete=true&consumer.namedQuery=ControlProductLoadTrigger")
        .routeId(getClass().getSimpleName()).doTry().process(new Processor()
{
    @Override
    public void process(Exchange exchange) throws Exception {
        List<Product> products = fetchProducts();
        exchange.getIn().setBody(products);
    }
}).split(body()).to("jpa:org.example.Product").endDoTry().doCatch(Throwable.class)
        .transform().simple("${exception.message}").log(LoggingLevel.ERROR,
"${body}").end();

This gives me:

java.lang.ClassCastException: org.apache.camel.model.RouteDefinition cannot
be cast to org.apache.camel.model.TryDefinition



--
View this message in context: 
http://camel.465427.n5.nabble.com/endDoTry-problem-tp5543541p5743050.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to