javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2473

NullPointerException in FaceletPartialStateManagementStrategy

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.11
    • Fix Version/s: 2.1.12, 2.2.0-m05
    • Component/s: state saving
    • Labels:
      None
    • Environment:

      Mojarra 2.1.11

      Description

      We have a NullPointerException I described here http://java.net/jira/browse/JAVASERVERFACES-1554

      Stack trace:

      SCHWERWIEGEND: Error Rendering View[/sections/masterDetail/basicNavigation.xhtml]
      java.lang.NullPointerException
      at com.sun.faces.application.view.FaceletPartialStateManagementStrategy.saveDynamicActions(FaceletPartialStateManagementStrategy.java:426)
      at com.sun.faces.application.view.FaceletPartialStateManagementStrategy.saveView(FaceletPartialStateManagementStrategy.java:491)
      at com.sun.faces.application.StateManagerImpl.saveView(StateManagerImpl.java:89)
      at javax.faces.application.StateManager.getViewState(StateManager.java:553)
      at com.sun.faces.context.PartialViewContextImpl.renderState(PartialViewContextImpl.java:416)
      at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:300)
      at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:183)
      at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:981)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:409)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:575)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1365)
      at org.primefaces.extensions.showcase.webapp.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:60)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1336)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:483)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1061)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:412)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:995)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
      at org.eclipse.jetty.server.Server.handle(Server.java:347)
      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:451)
      at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:931)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:870)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:238)
      at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:75)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:615)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
      at java.lang.Thread.run(Thread.java:662)

      To reproduce it, deploy the attached WAR file (Mojarra 2.1.11 is below WEB-INF/lib), go to the "MasterDetail" component --> "Basic Navigation level by level" --> Click on any link in a table entry. If it's too complicate for you to deploy this app, you can run it with Jetty. Please follow "Build from Source" instructions on this page http://code.google.com/p/primefaces-extensions/wiki/GettingStarted Just check out the project and run the showcase with "mvn jetty:run". Go then to the page http://localhost:8080/primeext-showcase/sections/masterDetail/basicNavigation.jsf and click on "Football" link e.g.

      Mojarra 2.1.9 / 2.1.10 were fine. You can see the same showcase for Mojarra 2.1.9 online here http://fractalsoft.net/primeext-showcase-mojarra/sections/masterDetail/basicNavigation.jsf Click on links in the table. Everything is fine.

      I hope you can figure out the issue. Thanks in advance!

        Issue Links

          Activity

          Hide
          ova2 added a comment -

          Local link is http://localhost:8080/showcase-0.6.0-SNAPSHOT/sections/masterDetail/basicNavigation.jsf of course, because WAR file name is showcase-0.6.0-SNAPSHOT.war. I suggest to run it local with Jetty or Tomcat. The best way, as I said, is to run the web app with built-in maven-jetty plugin (see http://code.google.com/p/primefaces-extensions/wiki/GettingStarted).

          Show
          ova2 added a comment - Local link is http://localhost:8080/showcase-0.6.0-SNAPSHOT/sections/masterDetail/basicNavigation.jsf of course, because WAR file name is showcase-0.6.0-SNAPSHOT.war. I suggest to run it local with Jetty or Tomcat. The best way, as I said, is to run the web app with built-in maven-jetty plugin (see http://code.google.com/p/primefaces-extensions/wiki/GettingStarted ).
          Hide
          Manfred Riem added a comment -

          The fix for issue #2471 also fixes this issue

          Show
          Manfred Riem added a comment - The fix for issue #2471 also fixes this issue

            People

            • Assignee:
              Manfred Riem
              Reporter:
              ova2
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: