ICEfaces
  1. ICEfaces
  2. ICE-4533

NPE if persistentFacesState.render() is called from another thread

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 1.8, 1.8.1
    • Fix Version/s: None
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces 1.8
      JSF RI 1.2
    • Workaround Exists:
      Yes
    • Workaround Description:
      Same as in ICE-4251

      Description

      If persistentFacesState.render() is called from a new thread started in a BackingBean action, an NullPointerException is thrown because the ViewRoot is null.

        Activity

        Hide
        Adrian Gygax added a comment -

        Attached example with applied workaround. Without the code between "Begin of the workaround" and "End of the workaround" this Exception is thrown:

        26.05.2009 16:00:36 com.sun.faces.lifecycle.Phase doPhase
        SCHWERWIEGEND: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: ) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@2af8f5]
        com.icesoft.faces.webapp.xmlhttp.TransientRenderingException: transient render failure for View[3iY19WbOjnl7P3I1amvO0A:1]
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.transientRenderingException(PersistentFacesState.java:520)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.throwRenderingException(PersistentFacesState.java:532)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:178)
        at mypackage.BackingBean$1.run(BackingBean.java:100)
        at java.lang.Thread.run(Thread.java:595)
        Caused by: javax.faces.FacesException: java.lang.NullPointerException
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:128)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:176)
        ... 2 more
        Caused by: java.lang.NullPointerException
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:354)
        at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153)
        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
        ... 4 more

        Show
        Adrian Gygax added a comment - Attached example with applied workaround. Without the code between "Begin of the workaround" and "End of the workaround" this Exception is thrown: 26.05.2009 16:00:36 com.sun.faces.lifecycle.Phase doPhase SCHWERWIEGEND: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: ) Exception thrown during phase execution: javax.faces.event.PhaseEvent [source=com.sun.faces.lifecycle.LifecycleImpl@2af8f5] com.icesoft.faces.webapp.xmlhttp.TransientRenderingException: transient render failure for View [3iY19WbOjnl7P3I1amvO0A:1] at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.transientRenderingException(PersistentFacesState.java:520) at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.throwRenderingException(PersistentFacesState.java:532) at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:178) at mypackage.BackingBean$1.run(BackingBean.java:100) at java.lang.Thread.run(Thread.java:595) Caused by: javax.faces.FacesException: java.lang.NullPointerException at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:128) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:176) ... 2 more Caused by: java.lang.NullPointerException at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:354) at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) ... 4 more
        Hide
        Adrian Gygax added a comment -

        The workaround isn't needed with 1.7.2. I think is issue is closely related to ICE-4251.

        Show
        Adrian Gygax added a comment - The workaround isn't needed with 1.7.2. I think is issue is closely related to ICE-4251 .
        Hide
        Ken Fyten added a comment -

        Marking as Closed / Invalid as part of legacy ICEfaces 1.x, 2.x JIRA cleanup.

        Note: This issue may be resolved in a newer ICEfaces release, available here: http://www.icesoft.org/java/downloads/icefaces-downloads.jsf

        If the issue persists with the current ICEfaces release, please create a new JIRA for it.

        Show
        Ken Fyten added a comment - Marking as Closed / Invalid as part of legacy ICEfaces 1.x, 2.x JIRA cleanup. Note: This issue may be resolved in a newer ICEfaces release, available here: http://www.icesoft.org/java/downloads/icefaces-downloads.jsf If the issue persists with the current ICEfaces release, please create a new JIRA for it.

          People

          • Assignee:
            Unassigned
            Reporter:
            Adrian Gygax
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: