With http2 enabled(h2 with https), after AsyncContext started, ServletInputStream sis = request.getInputStream(); sis.setReadListener(this); //this line throw exception java.lang.NullPointerException at org.apache.coyote.http2.Stream$StreamInputBuffer.registerReadInterest(Stream.java:920) at org.apache.coyote.http2.StreamProcessor.registerReadInterest(StreamProcessor.java:176) at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:453) at org.apache.coyote.Request.action(Request.java:430) at org.apache.catalina.connector.InputBuffer.isReady(InputBuffer.java:287) at org.apache.catalina.connector.InputBuffer.setReadListener(InputBuffer.java:243) at org.apache.catalina.connector.CoyoteInputStream.setReadListener(CoyoteInputStream.java:207) If the post data as query string, then no problem. but if the post data as http request body, then I got the above exception.
By the way, the code is in a AsyncContextHandler ServletInputStream sis = request.getInputStream(); sis.setReadListener(this); //this line throw exception, this is the ACHandler any way, this will never be null, it has nothing to do with this. And it is easy to see in Stream.java.
Fixed in 9.0.2. I don't know if there's a root cause that needs to be fixed.
By the way, If I remove <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" /> from the https connector then I will not got this NullPointerException. Good to know, you people have already fixed it. Great.
9.0.1 is still in beta, where can I download the 9.0.2 in alpha or something?
The fix will be included in 9.0.2 and 8.5.24.