camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-7666) CamelContext.addService may fail with java.util.ConcurrentModificationException
Date Thu, 07 Aug 2014 14:50:15 GMT

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

Claus Ibsen resolved CAMEL-7666.
--------------------------------

    Resolution: Fixed

> CamelContext.addService may fail with java.util.ConcurrentModificationException
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-7666
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7666
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.12.4, 2.13.2
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.12.5, 2.13.3, 2.14.0
>
>
> Most likely to happen only for pojo consuming where you may have a JMS listener execute
concurrently and do some routing, and on initial messages then they need to register as service
in CamelContext which can trigger to this ConcurrentModificationException.
> {code}
> 2014-08-07 10:09:09,338 [sonnel.records]] WARN  EndpointMessageListener        - Execution
of JMS message listener failed. Caused by: [org.apache.camel.FailedToCreateProducerException
- Failed to create Producer for endpoint: Endpoint[file://target/messages/amer/finance_pickup].
Reason: java.util.ConcurrentModificationException]
> org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint:
Endpoint[file://target/messages/amer/finance_pickup]. Reason: java.util.ConcurrentModificationException
> 	at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:410)
> 	at org.apache.camel.impl.ProducerCache.acquireProducer(ProducerCache.java:123)
> 	at org.apache.camel.processor.RecipientListProcessor.createProcessorExchangePairs(RecipientListProcessor.java:174)
> 	at org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:219)
> 	at org.apache.camel.processor.RecipientList.sendToRecipientList(RecipientList.java:167)
> 	at org.apache.camel.component.bean.MethodInfo$1.doProceed(MethodInfo.java:286)
> 	at org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:252)
> 	at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:166)
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
> 	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
> 	at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103)
> 	at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562)
> 	at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500)
> 	at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468)
> 	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)
> 	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)
> 	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1101)
> 	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1093)
> 	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:990)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at java.lang.Thread.run(Thread.java:744)
> 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.doAddService(DefaultCamelContext.java:976)
> 	at org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:963)
> 	at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:408)
> 	... 22 more
> 2014-08-07 10:09:09,345 [main           ] INFO  SpringCamelContext             - Apache
Camel 2.14-SNAPSHOT (CamelContext: camel-1) started in 0.254 seconds
> 2014-08-07 10:09:14,347 [main           ] INFO  CamelContextTest               - ********************************************************************************
> 2014-08-07 10:09:14,347 [main           ] INFO  CamelContextTest               - Testing
done: testCheckFiles(org.apache.camel.example.pojo_messaging.CamelContextTest)
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message