2

我正在尝试访问在我的 Wildfly 实例上运行的 Web 服务。Web 服务被注释为 Post 并接受 JSON。当我尝试调用该服务时,我的 Wildfly 会引发 Nullpointerexception。

实际的堆栈跟踪如下所示:

15:23:40,324 ERROR [io.undertow.request] (default task-1) Undertow request  failed HttpServerExchange{ POST <path to my service>}: java.lang.NullPointerException
at io.undertow.servlet.spec.ServletInputStreamImpl.readIntoBuffer(ServletInputStreamImpl.java:171)
at io.undertow.servlet.spec.ServletInputStreamImpl.close(ServletInputStreamImpl.java:245)
at io.undertow.servlet.spec.HttpServletRequestImpl.closeAndDrainRequest(HttpServletRequestImpl.java:602)
at io.undertow.servlet.core.ServletBlockingHttpExchange.close(ServletBlockingHttpExchange.java:87)
at io.undertow.server.HttpServerExchange.endExchange(HttpServerExchange.java:1444)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:213)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_75]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75]

我真的不明白是什么引起了 Nullpointerexception,因为我对 Wildfly 开发不是很熟悉。

4

1 回答 1

3

似乎是 WildFly 缺陷:UNDERTOW-367: NullPointerException when POST 方法没有普通参数

于 2015-07-09T13:24:10.130 回答