camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terral Guillaume (JIRA)" <>
Subject [jira] [Created] (CAMEL-8798) weaveAddLast throwing UnsupportedOperation when route have a ChoiceDefinition
Date Tue, 26 May 2015 13:15:17 GMT
Terral Guillaume created CAMEL-8798:

             Summary: weaveAddLast throwing UnsupportedOperation when route have a ChoiceDefinition
                 Key: CAMEL-8798
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.15.2, 2.15.1, 2.15.0, 2.14.2
         Environment: JDK 7.0 64bits
            Reporter: Terral Guillaume

I'm currently upgrading from Camel 2.14.1 to 2.15.2, after the upgrade some of my test are

My route is: 
My test contains : 
        {code}camelContext.getRouteDefinition("MyRoute").adviceWith(camelContext, new AdviceWithRouteBuilder()
            public void configure() {
The weaveAddLast is failing with the following stackTrace: 
        at java.util.AbstractList.add( 
        at org.apache.camel.builder.AdviceWithTasks$4.task( 
        at org.apache.camel.model.RouteDefinition.adviceWith( 
After some debug I found that when my route and with a Choice I cannot weaveAddLast the route.

When the AdviceWithTasks task method try to add the outputs (here) the implementation of the
list return by the ChoiceDefinition class does not implements the method add(int,Object) then
we have the UnsupportedOperation 

The difference between 2.14.1 and 2.15.2 is that in the AdviceWithTasks the outputs list where
the weaveAddLast try to find the last Processor to add the outputs is not a list returned
by ChoiceDefinition but it's a list with the Logs processor. 

This difference is there because now in 2.15.2 the method that is going through the route
to retrieve the outputs nodes have a maximum depth which is computed here  

When my route have finish with a ChoiceDefinition the maximum depth computed is only 1 then
I cannot have my logs in outputs an the weaveAddLast have in his list only the ChoiceDefinition.

This message was sent by Atlassian JIRA

View raw message