servlet [Faces Servlet]的Servlet.service()在路径上下文中引发了带有根本原因的异常[null]

时间:2013-07-05 02:45:08

标签: java spring jsf

当我使用chrome时,出现了这个错误,但是使用firefox,没有这样的错误。我甚至不知道如何调试。在错误信息中,没有关于哪个对象为空的线索。你能帮我个忙吗?以下是详细信息:


  

?? 05,2013 10:42:16 ?? org.icefaces.impl.event.BridgeSetup   getBodyResources警告:无法找到WindowScope进行查看   /cECI/domainReport.xhtml ?? 05,2013 10:42:17 ??   com.sun.faces.application.view.FaceletViewHandlingStrategy   handleRenderException SEVERE:错误渲染   查看[/cECI/domainReport.xhtml] java.lang.NullPointerException at   org.icefaces.impl.event.WindowAndViewIDSetup $ 1.encode(WindowAndViewIDSetup.java:65)     在   org.icefaces.impl.event.UIOutputWriter.encodeBegin(UIOutputWriter.java:27)     在javax.faces.component.UIComponent.encodeAll(UIComponent.java:1777)     在javax.faces.render.Renderer.encodeChildren(Renderer.java:168)at   org.icefaces.impl.renderkit.RendererWrapper.encodeChildren(RendererWrapper.java:49)     在   javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)     在javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)     在javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)     在javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)     在   com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:419)     在   com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)     在   org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)     在   com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)     在com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)at   com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)     在javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)     在   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     在   org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:147)     在   org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)     在   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)     在   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:311)     在   org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)     在   org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:323)     在   org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:323)     在   org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:323)     在   org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:323)     在   org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:323)     在   org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:323)     在   org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:323)     在   org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:323)     在   org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:323)     在   org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)     在   org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)     在   org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)     在   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)     在   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     在   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)     在   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)     在   org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)     在   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)     在   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)     在   org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)     在   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)     在   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)     在   org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)     在   org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:585)     在   org.apache.tomcat.util.net.JIoEndpoint $ SocketProcessor.run(JIoEndpoint.java:312)     在   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)     在   java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:603)     在java.lang.Thread.run(Thread.java:722)

     

?? 05,2013 10:42:17 ?? org.apache.catalina.core.StandardWrapperValve   调用SEVERE:servlet中的Servlet.service()[Faces Servlet]   路径[/ CIPortal]的上下文引发异常[null]的根本原因   java.lang.NullPointerException at   org.icefaces.impl.event.WindowAndViewIDSetup $ 1.encode(WindowAndViewIDSetup.java:65)     在   org.icefaces.impl.event.UIOutputWriter.encodeBegin(UIOutputWriter.java:27)     在javax.faces.component.UIComponent.encodeAll(UIComponent.java:1777)     在javax.faces.render.Renderer.encodeChildren(Renderer.java:168)at   org.icefaces.impl.renderkit.RendererWrapper.encodeChildren(RendererWrapper.java:49)     在   javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)     在javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)     在javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)     在javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)     在   com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:419)     在   com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)     在   org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)     在   com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)     在com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)at   com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)     在javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)     在   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     在   org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:147)     在   org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)     在   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)     在   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:311)     在   org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)     在   org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:323)     在   org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:323)     在   org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:323)     在   org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:323)     在   org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:323)     在   org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:323)     在   org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:323)     在   org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:323)     在   org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)     在   org.springframework.security.web.FilterChainProxy $ VirtualFilterChain.doFilter(FilterChainProxy.java:323)     在   org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)     在   org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)     在   org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)     在   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)     在   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     在   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)     在   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)     在   org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)     在   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)     在   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)     在   org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)     在   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)     在   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)     在   org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)     在   org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:585)     在   org.apache.tomcat.util.net.JIoEndpoint $ SocketProcessor.run(JIoEndpoint.java:312)     在   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)     在   java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:603)     在java.lang.Thread.run(Thread.java:722)

我发现当我从domainReport.xhtml中删除命令链接时,错误消失了。我将命令链接更改为最简单,但没有帮助:

  

                                                          

我将命令链接更改为linkbutton。它没有帮助。我不知道为什么

1 个答案:

答案 0 :(得分:2)

错误很详细,超出了你提到的例外情况

com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException SEVERE: Error Rendering View[/cECI/domainReport.xhtml] java.lang.NullPointerException

你应该看看那个xhtml,这样才能正确呈现

此外,您可以在/ src文件夹中创建custo lo4j.properties,以从ICEFaces核心获取额外信息(在示例中设置为WARN,尝试使用INFO或DEBUG,直到您找到有关您的问题的更多信息)

log4j.rootLogger=INFO

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%d{dd MMM yyyy HH:mm:ss}] %-5p [%F:%L -- %M] - %m%n

log4j.logger.com.icesoft.faces.application.D2DViewHandler=WARN, stdout
log4j.logger.com.sun.faces.config.ConfigureListener=WARN, stdout

这将使您能够看到所有WARN来自jsf核心和icefaces到Eclipse的控制台。