当我们在 Tomcat 上同时访问 10 多个用户的 JSF 页面时,出现以下异常。我正在使用 JSF 2.0(我的面孔 2.0.5)和丰富的面孔 4。请注意它是随机发生的,并且没有重新创建此错误的步骤。当我们在我的应用程序上运行 10 个并发用户的负载测试时,我开始注意到它。
Please help !!!!.
The exception is as follows
SEVERE: Servlet.service() for servlet faces threw exception
java.lang.NullPointerException
at java.lang.Class.isAssignableFrom(Native Method)
at javax.faces.component.UIComponent$EventListenerWrapper.isListenerForSource(UIComponent.java:1111)
at org.apache.myfaces.application.ApplicationImpl._traverseListenerList(ApplicationImpl.java:2092)
at org.apache.myfaces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:522)
at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage._publishPostBuildComponentTreeOnRestoreViewEvent(FaceletViewDeclarationLanguage.java:436)
at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage._publishPostBuildComponentTreeOnRestoreViewEvent(FaceletViewDeclarationLanguage.java:454)
at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage._publishPostBuildComponentTreeOnRestoreViewEvent(FaceletViewDeclarationLanguage.java:466)
at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.buildView(FaceletViewDeclarationLanguage.java:349)
at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:66)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
at sun.reflect.GeneratedMethodAccessor361.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:349)
at sun.reflect.GeneratedMethodAccessor360.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:243)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
不幸的是,由于时间限制,我们可能无法升级 myfaces。基本上,我在仪表板页面上的链接很少,并且分为两个部分。第一部分显示所有链接,第一部分下方的第二部分显示用户在第一部分中单击的链接的内容。在我们的正常测试期间,一切正常,只有在负载测试期间,每当用户单击仪表板页面中的链接(员工)时,我们才会看到上面我的帖子中提供的异常。如果您需要更多详细信息,请告诉我。感谢您的所有帮助。