camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-8694) java.lang.NullPointerException in at org.apache.camel.component.netty4.http.NettyHttpProducer$NettyHttpProducerCallback.done
Date Fri, 24 Apr 2015 05:51:39 GMT

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

Claus Ibsen commented on CAMEL-8694:
------------------------------------

You are welcome to work on a patch to fix this
http://camel.apache.org/contributing.html

> java.lang.NullPointerException in at org.apache.camel.component.netty4.http.NettyHttpProducer$NettyHttpProducerCallback.done
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-8694
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8694
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-netty4-http
>    Affects Versions: 2.15.1
>            Reporter: Homayoun Zariv
>             Fix For: 2.15.2, 2.16.0
>
>
> I am using camel-netty4-http 2.15.1 version and getting the following NPE in org.apache.camel.component.netty4.http.NettyHttpProducer$NettyHttpProducerCallback.done.
Debugging through the code it seems like null check for response is missing.
>  public void done(boolean doneSync) {
>             try {
>                 NettyHttpMessage nettyMessage = exchange.hasOut() ? exchange.getOut(NettyHttpMessage.class)
: exchange.getIn(NettyHttpMessage.class);
>                 if (nettyMessage != null) {
>                     FullHttpResponse response = nettyMessage.getHttpResponse();
>                     // Need to retain the ByteBuffer for producer to consumer
>                     // TODO Remove this part of ByteBuffer right away
>                     response.content().retain();  <-- response in null
>                     if (response != null) {
> java.lang.NullPointerException
> 	at org.apache.camel.component.netty4.http.NettyHttpProducer$NettyHttpProducerCallback.done(NettyHttpProducer.java:98)
> 	at org.apache.camel.component.netty4.NettyProducer.process(NettyProducer.java:181)
> 	at org.apache.camel.component.netty4.http.NettyHttpProducer.process(NettyHttpProducer.java:52)
> 	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:129)
> 	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
> 	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:448)
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
> 	at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:111)
> 	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
> 	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:448)
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
> 	at org.apache.camel.component.netty4.handlers.ServerChannelHandler.processAsynchronously(ServerChannelHandler.java:134)
> 	at org.apache.camel.component.netty4.handlers.ServerChannelHandler.channelRead0(ServerChannelHandler.java:105)
> 	at org.apache.camel.component.netty4.http.handlers.HttpServerChannelHandler.channelRead0(HttpServerChannelHandler.java:202)
> 	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
> 	at org.apache.camel.component.netty4.http.handlers.HttpServerMultiplexChannelHandler.channelRead0(HttpServerMultiplexChannelHandler.java:119)
> 	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
> 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
> 	at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:32)
> 	at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:329)
> 	at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:36)
> 	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
> 	at java.lang.Thread.run(Thread.java:744)



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

Mime
View raw message