Chris Watts created CAMEL-5762:
----------------------------------
Summary: StackOverflowError when repeatedly stopping/starting route
Key: CAMEL-5762
URL: https://issues.apache.org/jira/browse/CAMEL-5762
Project: Camel
Issue Type: Bug
Components: camel-core
Affects Versions: 2.10.2
Reporter: Chris Watts
Essentially when repeatedly stopping and starting a route (consuming from JMS
queue) it eventually starts throwing StackOverflowError.
{code:java}
while (true) {
camelContext.stopRoute("route", 1500, TimeUnit.MILLISECONDS);
Thread.sleep(1000);
camelContext.startRoute("route", 1500, TimeUnit.MILLISECONDS);
Thread.sleep(1000);
}{code}
Log is:
{noformat}2012-10-30 07:00:34,701 INFO Thread1 MyTestThread - stopRoute
mainInRoute
2012-10-30 07:00:34,701 INFO Thread1
org.apache.camel.impl.DefaultShutdownStrategy - Starting to graceful shutdown 1
routes (timeout 1500 milliseconds)
2012-10-30 07:00:34,808 WARN Camel (camel) thread #4 - ShutdownTask
org.apache.camel.impl.DefaultShutdownStrategy - Error occurred while shutting
down route: Consumer[activemq://queue:test.queue?maxConcurrentConsumers=1].
This exception will be ignored.
java.lang.StackOverflowError
at
org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:104)
at
org.apache.camel.processor.UnmarshalProcessor.doStop(UnmarshalProcessor.java:105)
at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
at
org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
at
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
at
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.stop(AsyncProcessorConverterHelper.java:96)
at
org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
at
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
at
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
at
org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
at
org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
at
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
at
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
at
org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
at
org.apache.camel.processor.interceptor.TraceInterceptor.doStop(TraceInterceptor.java:364)
at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
at
org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
at
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
at
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
......
at
org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
at
org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
at
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
at
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
at
org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:82)
at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:91)
at
org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)
at
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:128)
at
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:97)
2012-10-30 07:00:34,867 INFO Camel (camel) thread #4 - ShutdownTask
org.apache.camel.impl.DefaultShutdownStrategy - Route: mainInRoute shutdown
complete, was consuming from:
Endpoint[activemq://queue:test.queue?maxConcurrentConsumers=1]
2012-10-30 07:00:34,868 INFO Thread1
org.apache.camel.impl.DefaultShutdownStrategy - Graceful shutdown of 1 routes
completed in 0 seconds
2012-10-30 07:00:34,872 INFO Thread1 org.apache.camel.spring.SpringCamelContext
- Route: mainInRoute stopped, was consuming from:
Endpoint[activemq://queue:test.queue?maxConcurrentConsumers=1]{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira