camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Nathan (JIRA)" <>
Subject [jira] [Created] (CAMEL-7836) ConcurrentModificationException when creating dynamic routes
Date Thu, 18 Sep 2014 15:37:34 GMT
Matt Nathan created CAMEL-7836:

             Summary: ConcurrentModificationException when creating dynamic routes
                 Key: CAMEL-7836
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.13.1
            Reporter: Matt Nathan

There is a (small) chance of ConcurrentModificationException when creating routes dynamically.

  at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(
  at java.util.LinkedHashMap$
  at java.util.AbstractCollection.toArray(
  at java.util.ArrayList.&lt;init&gt;(
  at org.apache.camel.impl.DefaultCamelContext.getRoutes(
  at org.apache.camel.impl.DefaultCamelContext.getRoute(

The cause is that if you happen to be calling {{getRoute}} at the same time you are creating
a new route then the internals of {{new ArrayList}} call {{collection.toArray}} which throws
the error.

This message was sent by Atlassian JIRA

View raw message