Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-2051

NPE in BAseChangeManager

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.14-core
    • 1.2.15-core , 2.0.0-core
    • Components
    • None
    • 3.6, facelets 1.1.15, jsf-ri 1.2._12, trinidad 1.2.14

    Description

      After Updateing from Trinidad 1.2.13 to 1.2.14 I get the following Exception

      java.lang.NullPointerException
      at org.apache.myfaces.trinidad.change.BaseChangeManager.addComponentChange(BaseChangeManager.java:58)
      at org.apache.myfaces.trinidad.change.SessionChangeManager.addComponentChange(SessionChangeManager.java:64)
      at org.apache.myfaces.trinidad.component.UIXComponentBase.addAttributeChange(UIXComponentBase.java:1165)
      at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:266)
      at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:153)
      at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:271)
      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:755)
      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)

      I have a tr:table with rowSelection=multiple. When I select a row and navigate to another page i get the mentioned exception.

      it seems that this problem was introduced with TRINIDAD-1935.

      Because when navigating to another page there is a new UIViewRoot so parent results in null.

      A check for null solves the problem
      while (parent != null && parent != root)

      { ...... }

      The problem also exists in trinidad-2.0.0-beta-2

      Attachments

        1. baseChangeManagerpatch.patch
          2 kB
          Markus Dreher
        2. JIRA_2051_Patch_over_1_2_12_7_0-branch.patch
          0.7 kB
          Prakash Udupa

        Activity

          People

            darkarena Scott O'Bryan
            maece Markus Dreher
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: