Servlet 的 Servlet.service() 默认抛出异常 java.lang.NullPointerException
我们的系统使用 Struts 2。有时它会抛出 PWC1406: Servlet.service()
因为 servlet 默认抛出异常,但没有任何堆栈跟踪消息。有人能告诉我如何获得完整的堆栈跟踪吗?
以下是 glassfish 3.1 server.log 中的错误消息:
[#|2011-10-04T12:32:18.082+0800|WARNING|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=216;_ThreadName=Thread-2;|StandardWrapperValve[default]: PWC1406: Servlet.service() for servlet default threw exception
java.lang.NullPointerException
|#]
[#|2011-10-04T12:32:18.082+0800|SEVERE|glassfish3.1|org.apache.catalina.connector.CoyoteAdapter|_ThreadID=18;_ThreadName=Thread-2;|PWC3989: An exception or error occurred in the container during the request processing
java.lang.NullPointerException
|#]
[#|2011-10-04T12:32:18.082+0800|WARNING|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=216;_ThreadName=Thread-2;|Response Error during finishResponse
java.lang.NullPointerException
|#]
[#|2011-10-04T12:32:18.082+0800|SEVERE|glassfish3.1|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=18;_ThreadName=Thread-2;|GRIZZLY0037: Error finishing response.
java.lang.NullPointerException
|#]
[#|2011-10-04T12:32:18.082+0800|SEVERE|glassfish3.1|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=18;_ThreadName=Thread-2;|GRIZZLY0051: ProcessorTask exception.
java.lang.NullPointerException
|#]
非常感谢。
Our system using Struts 2. Sometimes it throws PWC1406: Servlet.service()
for servlet default threw exception, but without any stacktrace message. Do anyone can tell me how to get the full stacktrace?
The following are the error message in glassfish 3.1 server.log:
[#|2011-10-04T12:32:18.082+0800|WARNING|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=216;_ThreadName=Thread-2;|StandardWrapperValve[default]: PWC1406: Servlet.service() for servlet default threw exception
java.lang.NullPointerException
|#]
[#|2011-10-04T12:32:18.082+0800|SEVERE|glassfish3.1|org.apache.catalina.connector.CoyoteAdapter|_ThreadID=18;_ThreadName=Thread-2;|PWC3989: An exception or error occurred in the container during the request processing
java.lang.NullPointerException
|#]
[#|2011-10-04T12:32:18.082+0800|WARNING|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=216;_ThreadName=Thread-2;|Response Error during finishResponse
java.lang.NullPointerException
|#]
[#|2011-10-04T12:32:18.082+0800|SEVERE|glassfish3.1|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=18;_ThreadName=Thread-2;|GRIZZLY0037: Error finishing response.
java.lang.NullPointerException
|#]
[#|2011-10-04T12:32:18.082+0800|SEVERE|glassfish3.1|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=18;_ThreadName=Thread-2;|GRIZZLY0051: ProcessorTask exception.
java.lang.NullPointerException
|#]
Many thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果没有任何堆栈跟踪,我们将无法诊断这一点。
我的猜测是,您没有看到堆栈跟踪的原因是您的记录器已配置为不输出任何堆栈跟踪信息。所以你的第一步应该是调查这个问题。
We won't be able to diagnose this without any stacktraces.
My guess is that the reason you are not seeing stack traces is that your logger has been configured to not output any stacktrace information. So your first step should be to look into that issue.