You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2021/05/01 07:08:00 UTC

[jira] [Updated] (CAMEL-16566) camel-core - Nested enrich with shareUnitOfWork=true result in ConcurrentModificationException

     [ https://issues.apache.org/jira/browse/CAMEL-16566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-16566:
--------------------------------
    Summary: camel-core - Nested enrich with shareUnitOfWork=true result in ConcurrentModificationException  (was: Nested enrich with shareUnitOfWork=true result in ConcurrentModificationException)

> camel-core - Nested enrich with shareUnitOfWork=true result in ConcurrentModificationException
> ----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-16566
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16566
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 3.7.3
>            Reporter: Jens Kleine-Herzbruch
>            Priority: Major
>             Fix For: 3.10.0
>
>
> If you have routes that have nested enrichers that use shareUnitOfWork=true, you'll get a ConcurrentModificationException when the subroutes are joined back.
>  
> {code:java}
> from("direct:routeA").
>     enrichWith("direct:routeB", true, true).body((a, b) -> a);
> from("direct:routeB").
>     enrichWith("direct:routeC", true, true).body((a, b) -> a);
> from("direct:routeC").setBody(constant("xxx")); {code}
>  
> {code:java}
> org.apache.camel.CamelExchangeException: Error occurred during aggregation. Exchange[0A01B3DD98090F3-0000000000000001]. Caused by: [java.util.ConcurrentModificationException - null]
>  at org.apache.camel.processor.Enricher$1.done(Enricher.java:247) ~[camel-core-processor-3.7.3.jar:3.7.3]
>  at org.apache.camel.AsyncCallback.run(AsyncCallback.java:44) ~[camel-api-3.7.3.jar:3.7.3]
>  ...
> Caused by: java.util.ConcurrentModificationException
>  at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1042) ~[?:?]
>  at java.util.ArrayList$Itr.remove(ArrayList.java:1010) ~[?:?]
>  at org.apache.camel.impl.engine.DefaultUnitOfWork.handoverSynchronization(DefaultUnitOfWork.java:202) ~[camel-base-engine-3.7.3.jar:3.7.3]
>  at org.apache.camel.impl.engine.DefaultUnitOfWork.handoverSynchronization(DefaultUnitOfWork.java:179) ~[camel-base-engine-3.7.3.jar:3.7.3]
>  at org.apache.camel.support.DefaultExchange.handoverCompletions(DefaultExchange.java:612) ~[camel-support-3.7.3.jar:3.7.3]
>  at org.apache.camel.processor.Enricher$1.done(Enricher.java:242) ~[camel-core-processor-3.7.3.jar:3.7.3]
>  ... {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)