servlet .service()为servlet默认抛出异常java.lang.NullPointerExcepti



我们的系统使用struts2。有时它抛出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
|#]
许多谢谢。

如果没有任何堆栈跟踪,我们将无法诊断此问题。

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

最新更新