1 Reply Latest reply on Jun 16, 2011 3:42 PM by Bob Muller

    Get null pointer exception from Facelets on accessing Faces page after restarting JBoss

    Bob Muller Novice

      Yesterday I started my development JBoss nodes up to test a new deployment of our web app and got this Facelets Java exception on the first RichFaces page I went to:

       

      2011-06-16 09:52:44,752 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/]] (ajp-prodnode4%2F10.20.20.49-8009-6) JSP Error

      java.lang.NullPointerException

          at com.sun.facelets.util.Classpath.searchDir(Classpath.java:94)

          at com.sun.facelets.util.Classpath.search(Classpath.java:76)

          at com.sun.facelets.compiler.TagLibraryConfig.loadImplicit(TagLibraryConfig.java:428)

          at com.sun.facelets.compiler.Compiler.initialize(Compiler.java:87)

          at com.sun.facelets.compiler.Compiler.compile(Compiler.java:104)

          at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:218)

          at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:149)

          at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:100)

          at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:517)

          at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)

          at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)

          at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)

          at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)

          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)

          at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)

          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)

          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)

          at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:444)

          at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)

          at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310)

          at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:76)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

          at org.jboss.web.tomcat.service.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:135)

          at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:94)

          at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(JvmRouteValve.java:88)

          at org.jboss.web.tomcat.service.session.LockingValve.invoke(LockingValve.java:62)

          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

          at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:436)

          at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:384)

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

          at java.lang.Thread.run(Thread.java:662)

       

      The problem seems to disappear only to reappear when I restart the nodes (we are using a two-node JBoss cluster). I hate these intermittent things, impossible to debug!

       

      I realize this isn't really a RichFaces issue, but I would appreciate any insights or suggestions from Faces experts for where to look or why this might have suddenly started happening; there were no configuration changes to the JBoss or Faces setup that I am aware of, so it's a total mystery to me.