You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2015/05/21 05:19:00 UTC

[jira] [Commented] (CAMEL-8785) StackOverFlowError using Custom InterceptStrategy

    [ https://issues.apache.org/jira/browse/CAMEL-8785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14553564#comment-14553564 ] 

Willem Jiang commented on CAMEL-8785:
-------------------------------------

As the Custom InterceptStrategy could introduce a cycle to processor chain, that lead to the StackOverFlowError.
We need to avoid this cycle when setup the InterceptorToAsyncProcessorBridge.

> StackOverFlowError using Custom InterceptStrategy
> -------------------------------------------------
>
>                 Key: CAMEL-8785
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8785
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.14.2
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>             Fix For: 2.14.3, 2.16.0, 2.15.3
>
>
> Testing a route including camel's custom InterceptStrategy, http://camel.apache.org/intercept.html, got a StackOverFlowError as below,
> {code}
> org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: Test]
> at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1379)
> at org.apache.camel.impl.DefaultExchange.setException(DefaultExchange.java:283)
> at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:381)
> at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:346)
> at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:242)
> at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:346)
> Caused by: java.lang.StackOverflowError
> at java.lang.ThreadLocal$ThreadLocalMap.nextIndex(ThreadLocal.java:313)
> at java.lang.ThreadLocal$ThreadLocalMap.expungeStaleEntry(ThreadLocal.java:563)
> at java.lang.ThreadLocal$ThreadLocalMap.remove(ThreadLocal.java:461)
> at java.lang.ThreadLocal$ThreadLocalMap.access$200(ThreadLocal.java:261)
> at java.lang.ThreadLocal.remove(ThreadLocal.java:202)
> {code}
> The stack shows me StackOverFlowError on the org.apache.camel.processor.InterceptorToAsyncProcessorBridge.process() for the affected camel versions.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)