Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-9383

ConcurrentModificationException on running Camel via Main class

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: 2.16.1
    • Component/s: None
    • Labels:
      None
    • Environment:

      MacOS X 10.10.5
      Java(TM) SE Runtime Environment (build 1.7.0_79-b15)

    • Estimated Complexity:
      Unknown

      Description

      Scenario:
      Custom component in the route have owned RouteBuilder which is injecting route which is constructed by RouteBuilder to Camel Context where this component living.

      2015-12-01 15:48:05,449 [main ] INFO o.a.c.s.SpringCamelContext - - - Apache Camel 2.16.1 (CamelContext: hl7-requestor_context) is shutdown in 0.005 seconds
      Exception in thread "main" org.apache.camel.RuntimeCamelException: java.util.ConcurrentModificationException
      at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1642)
      at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:138)
      at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:340)
      at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:151)
      at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:128)
      at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:331)
      at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:775)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
      at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140)
      at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:94)
      at org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:205)
      at org.apache.camel.spring.Main.doStart(Main.java:154)
      at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
      at org.apache.camel.main.MainSupport.run(MainSupport.java:124)
      at org.apache.camel.main.MainSupport.run(MainSupport.java:343)
      at org.apache.camel.spring.Main.main(Main.java:87)
      Caused by: java.util.ConcurrentModificationException
      at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:859)
      at java.util.ArrayList$Itr.next(ArrayList.java:831)
      at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:3257)
      at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2981)
      at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:175)
      at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2812)
      at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2808)
      at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2831)
      at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2808)
      at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
      at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2777)
      at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:270)
      at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:136)
      ... 14 more

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vromaniuk Vladimir Romaniuk
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: