Servlet 的 Servlet.service() 默认抛出异常 java.lang.NullPointerException

发布于 2024-12-08 02:52:54 字数 1384 浏览 0 评论 0原文

我们的系统使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

意中人 2024-12-15 02:52:54

如果没有任何堆栈跟踪,我们将无法诊断这一点。

我的猜测是,您没有看到堆栈跟踪的原因是您的记录器已配置为不输出任何堆栈跟踪信息。所以你的第一步应该是调查这个问题。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文