weblogic 10.3.5抛出nullPointerException

时间:2014-06-24 15:18:30

标签: java struts2 weblogic-10.x

在weblogic 10.3.5上部署了我的struts2应用程序,但它抛出了一个带有以下跟踪的nullPointerException:

> WatchRuleType: Log  WatchRule: (SEVERITY = 'Error') AND ((MSGID =
> 'WL-101020') OR (MSGID = 'WL-101017') OR (MSGID = 'WL-000802') OR
> (MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID =
> 'BEA-000802'))  WatchData: DATE = Jun 24, 2014 9:58:11 AM EDT SERVER =
> eSrvcs_ManagedServer_1 MESSAGE =
> [ServletContext@1412211888[app:eServices module:eServices.war
> path:/eServices spec-version:2.5]] Servlet failed with Exception
> java.lang.NullPointerException    at
> weblogic.servlet.internal.ServletResponseImpl.sendContentError(ServletResponseImpl.java:611)
>   at
> weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:655)
>   at
> org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:914)
>   at
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:574)
>   at
> org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
>   at
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
>   at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
>   at
> oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
>   at java.security.AccessController.doPrivileged(Native Method)   at
> oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
>   at
> oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
>   at
> oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
>   at
> oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
>   at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
>   at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
>   at
> oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
>   at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
>   at
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
>   at
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
>   at
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
>   at
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
>   at
> weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
>   at
> weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
>   at
> weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
>   at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)  at
> weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

似乎NPE是由weblogic类而不是struts2类抛出的。作为来自apache的人的建议,我在weblogic.xml中设置了archived-real-path,如下所示。

 <wls:container-descriptor>
            <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
            <wls:show-archived-real-path-enabled>true</wls:show-archived-real-path-enabled>     
</wls:container-descriptor>

然而,这似乎并没有帮助我得到的例外。不确定这是否是weblogic中的错误。任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:2)

长期以来,问题是服务器上没有启用JPA 2.0。