3 Replies Latest reply on Aug 20, 2015 11:39 AM by sanjeev mekali

    Empty Stack Exception : Error occurred during onExchangeDone on RoutePolicy

    Devesh Kandpal Newbie

      Hi,

       

       

      I have an FSW Switchyard service which has a file binding attached to a bean component.

       

      The switchyard service, picks up the input file and does all the processing that is needed, which includes couple of web-service calls and majorly persisting in the backend Oracle database.

       

       

      After successfully completing the last step of the processing , the file was moved to the end destination folder, all our database transactions were properly committed , however, immediately the below warning was shown in the log file highlighting an empty stack exception.

       

       

      Could you kindly help us understand the possible cause for the aforementioned warning in the below log file at the earliest ?

       

      Appreciate all the time and help!

       

       

       

       

       

      18:48:09,166 WARN  [org.apache.camel.processor.RoutePolicyProcessor] (Camel (camel-19) thread #36 - file:///opt/EAP/File/AssetDataInterface/In) Error occurred during onExchangeDone on RoutePolicy: org.switchyard.as7.extension.camel.NamespaceContextPolicy@5c379c8c. This exception will be ignored: java.util.EmptyStackException

      at org.jboss.as.naming.util.ThreadLocalStack.pop(ThreadLocalStack.java:57)

      at org.jboss.as.naming.context.NamespaceContextSelector.popCurrentSelector(NamespaceContextSelector.java:57)

      at org.switchyard.as7.extension.camel.NamespaceContextPolicy.onExchangeDone(NamespaceContextPolicy.java:52) [switchyard-deploy-jboss-as7-1.1.1-p9-redhat-1.jar:1.1.1-p9-redhat-1]

      at org.apache.camel.processor.RoutePolicyProcessor$1.onDone(RoutePolicyProcessor.java:83) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.support.SynchronizationAdapter.onComplete(SynchronizationAdapter.java:33) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:55) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:226) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.processor.UnitOfWorkProcessor.doneUow(UnitOfWorkProcessor.java:199) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.processor.UnitOfWorkProcessor.access$000(UnitOfWorkProcessor.java:37) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.processor.UnitOfWorkProcessor$1.done(UnitOfWorkProcessor.java:157) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.processor.RouteContextProcessor$1.done(RouteContextProcessor.java:56) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.processor.Pipeline.process(Pipeline.java:106) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:46) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.processor.RoutePolicyProcessor.process(RoutePolicyProcessor.java:98) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:336) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:189) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:155) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:142) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92) [camel-core-2.10.0.redhat-60065.jar:2.10.0.redhat-60065]

      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_65]

      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) [rt.jar:1.7.0_65]

      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) [rt.jar:1.7.0_65]

      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [rt.jar:1.7.0_65]

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_65]

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]

      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]

       

      18:48:09,181 ERROR [stderr] (Camel (camel-19) thread #36 - file:///opt/EAP/File/AssetDataInterface/In) Exception in thread "Camel (camel-19) thread #36 - file:///opt/EAP/File/AssetDataInterface/In" java.util.EmptyStackException

      18:48:09,181 ERROR [stderr] (Camel (camel-19) thread #36 - file:///opt/EAP/File/AssetDataInterface/In) at org.jboss.as.naming.util.ThreadLocalStack.pop(ThreadLocalStack.java:57)

      18:48:09,181 ERROR [stderr] (Camel (camel-19) thread #36 - file:///opt/EAP/File/AssetDataInterface/In) at org.jboss.as.naming.context.NamespaceContextSelector.popCurrentSelector(NamespaceContextSelector.java:57)

      18:48:09,182 ERROR [stderr] (Camel (camel-19) thread #36 - file:///opt/EAP/File/AssetDataInterface/In) at org.switchyard.as7.extension.camel.JBossThreadPoolFactory.after(JBossThreadPoolFactory.java:173)

      18:48:09,182 ERROR [stderr] (Camel (camel-19) thread #36 - file:///opt/EAP/File/AssetDataInterface/In) at org.switchyard.as7.extension.camel.JBossThreadPoolFactory.access$100(JBossThreadPoolFactory.java:44)

      18:48:09,182 ERROR [stderr] (Camel (camel-19) thread #36 - file:///opt/EAP/File/AssetDataInterface/In) at org.switchyard.as7.extension.camel.JBossThreadPoolFactory$1.afterExecute(JBossThreadPoolFactory.java:68)

      18:48:09,182 ERROR [stderr] (Camel (camel-19) thread #36 - file:///opt/EAP/File/AssetDataInterface/In) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)

      18:48:09,182 ERROR [stderr] (Camel (camel-19) thread #36 - file:///opt/EAP/File/AssetDataInterface/In) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

      18:48:09,182 ERROR [stderr] (Camel (camel-19) thread #36 - file:///opt/EAP/File/AssetDataInterface/In) at java.lang.Thread.run(Thread.java:745)

       

       

       

      Regards,

      Devesh.

        • 1. Re: Empty Stack Exception : Error occurred during onExchangeDone on RoutePolicy
          Jorge Morales Master

          Hi Davesh,

          This sounds like a bug, so I recommend you opening a support ticket on Red Hat's support portal, since this is FSW.

          • 2. Re: Empty Stack Exception : Error occurred during onExchangeDone on RoutePolicy
            Tom Cunningham Master

            Devesh,

             

            How reproducible is this?   Are you seeing this repeatedly, or does this happen maybe just sporadically?    After looking at the code, I'm wondering if there's a race condition here.

            • 3. Re: Empty Stack Exception : Error occurred during onExchangeDone on RoutePolicy
              sanjeev mekali Newbie

              Hi Devesh,

               

              I am also getting same exception.. Did you find the root cause of the issue?

               

              ------ End Message Trace -------

              2015-08-20 13:43:25,682 WARN  [org.apache.camel.processor.RoutePolicyProcessor] (pool-22-thread-1) Error occurred during onExchangeDone on RoutePolicy: org.switchyard.as7.extension.camel.NamespaceContextPolicy@403436df. This exception will be ignored: java.util.EmptyStackException

                      at org.jboss.as.naming.util.ThreadLocalStack.pop(ThreadLocalStack.java:57)

                      at org.jboss.as.naming.context.NamespaceContextSelector.popCurrentSelector(NamespaceContextSelector.java:57)

                      at org.switchyard.as7.extension.camel.NamespaceContextPolicy.onExchangeDone(NamespaceContextPolicy.java:52) [switchyard-deploy-jboss-as7-1.1.1-p8-redhat-1.jar:1.1.1-p8-redhat-1]

                      at org.apache.camel.processor.RoutePolicyProcessor$1.onDone(RoutePolicyProcessor.java:83) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.support.SynchronizationAdapter.onComplete(SynchronizationAdapter.java:33) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:55) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:226) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.processor.UnitOfWorkProcessor.doneUow(UnitOfWorkProcessor.java:199) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.processor.UnitOfWorkProcessor.access$000(UnitOfWorkProcessor.java:37) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.processor.UnitOfWorkProcessor$1.done(UnitOfWorkProcessor.java:157) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.processor.RouteContextProcessor$1.done(RouteContextProcessor.java:56) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.processor.Pipeline.process(Pipeline.java:106) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:46) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.processor.RoutePolicyProcessor.process(RoutePolicyProcessor.java:98) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99) [camel-core-2.10.0.redhat-60061.jar:2.10.0.redhat-60061]

                                                                                                                                                          1290,1         0%