java.lang.NullPointerException: Cannot invoke "io.netty.handler.codec.http.HttpRequest.headers()" because "nettyRequest" is null
See original GitHub issueHttpRequest is a Nullable param in HttpServerOperations.
Invoking nettyRequest.headers() as part of the HttpServerOperations constructor resulting in NPE.
reactor-http-epoll-36 reactor.netty.transport.ServerTransport -- [56fa470a, L:/17.171.24.85:40004 ! R:/17.157.16.116:42506] onUncaughtException(SimpleConnection{channel=[id: 0x56fa470a, L:/17.171.24.85:40004 ! R:/17.157.16.116:42506]})
java.lang.NullPointerException: Cannot invoke "io.netty.handler.codec.http.HttpRequest.headers()" because "nettyRequest" is null
at reactor.netty.http.server.HttpServerOperations.<init>(HttpServerOperations.java:166) ~[reactor-netty-http-1.0.17.jar!/:1.0.17]
at reactor.netty.http.server.HttpServerOperations$FailedHttpServerRequest.<init>(HttpServerOperations.java:925) ~[reactor-netty-http-1.0.17.jar!/:1.0.17]
at reactor.netty.http.server.HttpServerOperations.sendDecodingFailures(HttpServerOperations.java:769) ~[reactor-netty-http-1.0.17.jar!/:1.0.17]
at reactor.netty.http.server.HttpTrafficHandler.sendDecodingFailures(HttpTrafficHandler.java:271) ~[reactor-netty-http-1.0.17.jar!/:1.0.17]
at reactor.netty.http.server.HttpTrafficHandler.channelRead(HttpTrafficHandler.java:231) ~[reactor-netty-http-1.0.17.jar!/:1.0.17]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.75.Final.jar!/:4.1.75.Final]
at reactor.netty.http.server.logging.AccessLogHandlerH1.channelRead(AccessLogHandlerH1.java:58) ~[reactor-netty-http-1.0.17.jar!/:1.0.17]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) ~[netty-transport-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327) ~[netty-codec-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:299) ~[netty-codec-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) ~[netty-transport-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:800) ~[netty-transport-classes-epoll-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:480) ~[netty-transport-classes-epoll-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) ~[netty-transport-classes-epoll-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) ~[netty-common-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.75.Final.jar!/:4.1.75.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.75.Final.jar!/:4.1.75.Final]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
- Netty version - 1.0.17
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
HttpRequest coming as null resulting in java.lang ... - GitHub
Running reactor-netty-http:1.0.2 resulting in below error intermittently. Any suggestions? ... Final] at io.netty.handler.codec.
Read more >Netty 4 Decoder Issue - java - Stack Overflow
I am developing an smpp-based application. However I have noticed something while I am decoding the smpp PDU. When the app receives few...
Read more >Example usage for io.netty.handler.codec.http HttpRequest ...
In this page you can find the example usage for io.netty.handler.codec.http HttpRequest headers. Prototype. HttpHeaders headers();. Source Link. Document.
Read more >io.netty.handler.codec.http.HttpRequest.headers java code ...
private static boolean isUpgradeRequest(HttpObject msg) { return msg instanceof HttpRequest && ((HttpRequest) msg).headers().get(HttpHeaderNames.UPGRADE) !
Read more >Playing on LAN, help please! : r/Minecraft - Reddit
I'm getting the error: internal exception io.netty.handler.codec.encoderexception: java.lang.nullpointerexception: cannot invoke…
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@violetagg @pderop Sorry I was away and missed the notifications around the recent comments.
I’ll bump up the version and retest, and will reopen if the issue resurfaces again.
Thank you.
Hi @pderop, Sorry forgot to attach the stack trace before. I’ve updated the description.