Hi *,
we're seeing the exception below happening randomly under load. It stems
from
org/apache/camel/impl/DefaultUnitOfWork.java:
public RouteContext popRouteContext() {
if (routeContextStack.isEmpty()) {
return null;
}
return routeContextStack.pop();
}
It seems the stack gets empty inbetween the empty-check and the pop
operation.
What about doing something like this, to prevent this inconsistency:
public RouteContext popRouteContext() {
synchronized (routeContextStack) {
if (routeContextStack.isEmpty()) {
return null;
}
return routeContextStack.pop();
}
}
should i file a JIRA issue for this?
cheers,
Matthias
java.util.EmptyStackException
at java.util.Stack.peek(Stack.java:85)
at java.util.Stack.pop(Stack.java:67)
at
org.apache.camel.impl.DefaultUnitOfWork.popRouteContext(DefaultUnitOfWork.java:226)
at
org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:260)
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:256)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:143)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:78)
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:113)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85)
at
org.apache.camel.processor.aggregate.AggregateProcessor$1.run(AggregateProcessor.java:397)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Matthias Schmidt | Senior Software Engineer | Development & Delivery
InterComponentWare AG | Altrottstraße 31 | 69190 Walldorf (Baden) |
Germany
Tel.: +49 (0) 6227 385 333 81 | Fax: +49 (0) 6227 385 471
[email protected] | www.icw.de
InterComponentWare AG:
Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler
Aufsichtsratsvors.: Prof. Dr. Christof Hettich
Firmensitz: 69190 Walldorf, Altrottstraße 31
AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516