MyFaces Core
  1. MyFaces Core
  2. MYFACES-3101

NavigationHandlerImpl throws NullpointerException if view is expired

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.0.6
    • Component/s: General
    • Labels:
      None

      Description

      I tried to use the NavigationHandler inside a Faces exception handler to deal with ViewExpiredException as mentioned here: http://www.nfjsone.com/blog/ed_burns/2009/09/dealing_gracefully_with_viewexpiredexception_in_jsf2.

      The example does not work with myfaces, because org.apache.myfaces.application.NavigationHandlerImpl throws a NullpointerException while handleNavigation() is called.
      The exception occurs in line 160: String viewId = facesContext.getViewRoot().getViewId();

      I think the cause is that the viewroot is not set anymore when the ViewExpiredException is thrown.

      The official API for NavigationHandler.handleNavigation tells, that the NullpointerException is thrown only if the given facescontext is null.
      NullPointerException - if context is null

      1. MYFACES-3101-v2.patch
        6 kB
        Martin Kočí
      2. MYFACES-3101.patch
        4 kB
        Martin Kočí

        Issue Links

          Activity

          Leonardo Uribe made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Leonardo Uribe made changes -
          Fix Version/s 2.0.6 [ 12316397 ]
          Fix Version/s 2.0.6-SNAPSHOT [ 12316347 ]
          Jakob Korherr made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Fix Version/s 2.0.6-SNAPSHOT [ 12316347 ]
          Resolution Fixed [ 1 ]
          Jakob Korherr made changes -
          Link This issue relates to MYFACES-3105 [ MYFACES-3105 ]
          Martin Kočí made changes -
          Attachment MYFACES-3101-v2.patch [ 12475701 ]
          Martin Kočí made changes -
          Attachment MYFACES-3101.patch [ 12475610 ]
          Martin Kočí made changes -
          Field Original Value New Value
          Status Open [ 1 ] Patch Available [ 10002 ]
          Martin Stockhammer created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Martin Stockhammer
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development