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/03/06 15:23:38 UTC

[jira] [Commented] (CAMEL-8187) Ref count exception when throwing NettyHttpOperationFailedException

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

Willem Jiang commented on CAMEL-8187:
-------------------------------------

You can try to increase reference count of the bytebuf in your handler when catch the exception.
If you don't do that, you cannot access the byte buffer once out the handler.

> Ref count exception when throwing NettyHttpOperationFailedException
> -------------------------------------------------------------------
>
>                 Key: CAMEL-8187
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8187
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-netty4-http
>    Affects Versions: 2.14.1
>            Reporter: Amit R
>            Assignee: Willem Jiang
>         Attachments: Screenshot.jpg, bug-reproduce-two.zip
>
>
> When catching "NettyHttpOperationFailedException" with "onException" - I've noticed that I'm getting: 
> 'io.netty.util.IllegalReferenceCountException'  - cannot evaluate io.netty.handler.codec.http.HttpObjectAggregator$AggregatedFullHttpRequest.toString() - (As can be seen on screenshot.jpeg attached file)
> I've created a small app to reproduce the issue - you'll need to run the UT on the attached zip.
> when stopping on debug inside the onException clause and trying to inspect the exchange "In" message you can see the exception.
> Thx,
> Amit.
> P.S originally I've got the exception thrown during my real application running. in the example I'm setting the netty exception on the exchange "artificially" - the result however is the same.



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