MyFaces Core
  1. MyFaces Core
  2. MYFACES-3530

Implicit Navigation Does Not Work After ViewExpiredException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.13
    • Fix Version/s: 2.0.14, 2.1.8
    • Component/s: JSR-314
    • Labels:
      None
    • Environment:
      MyFaces 2.0.13 running on WebSphere Application Server

      Description

      When implementing a Custom ExceptionHandler to deal with ViewExpiredExceptions as suggested here: http://weblogs.java.net/blog/edburns/archive/2009/09/03/dealing-gracefully-viewexpiredexception-jsf2

      The implicit navigation to "viewExpired" does not work due to the fact that a "/" is not added to the "viewIdToTest" in NavigationHandlerImpl.getOutcomeNavigationCase. The algorithm was correct until we pulled in MYFACES-3101 to avoid
      a NullPointerException after a ViewExpiredException.

      The exception we see without the patch is the following:

      [4/19/12 20:52:15:323 EDT] 00000028 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[Faces Servlet]: org.apache.myfaces.lifecycle.ViewNotFoundException: A view is required to execute RENDER_RESPONSE(6)
      at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:62)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239)

      The view does exist but is no longer found since we don't add a "/" since the viewId is null.

      I've also added a couple of additional "null" checks that look to have been missed in MyFaces-3101.

      A test Application will be provided as well as a diff showing my changes to NavigationHandlerImpl.java and NavigationHandlerImplTest.java ( the ViewExpiredException test needs to look for /viewExpired not viewExpired after the fix...which to me seems correct )

      1. ViewExpiredException.war
        7 kB
        Paul Nicolucci
      2. NavigationHandlerImplTest.txt
        0.5 kB
        Paul Nicolucci
      3. NavigationHandlerImpl.txt
        1 kB
        Paul Nicolucci

        Activity

        Leonardo Uribe made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Leonardo Uribe made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Assignee Leonardo Uribe [ lu4242 ]
        Fix Version/s 2.0.14 [ 12320763 ]
        Fix Version/s 2.1.8 [ 12320759 ]
        Resolution Fixed [ 1 ]
        Paul Nicolucci made changes -
        Attachment NavigationHandlerImplTest.txt [ 12524384 ]
        Attachment NavigationHandlerImpl.txt [ 12524385 ]
        Paul Nicolucci made changes -
        Attachment NavigationHandlerImplTest.diff [ 12524383 ]
        Paul Nicolucci made changes -
        Attachment NavigationHandlerImpl.diff [ 12524382 ]
        Paul Nicolucci made changes -
        Attachment NavigationHandlerImplTest.txt [ 12523447 ]
        Paul Nicolucci made changes -
        Attachment NavigationHandlerImpl.txt [ 12523446 ]
        Paul Nicolucci made changes -
        Attachment NavigationHandlerImpl.diff [ 12524382 ]
        Attachment NavigationHandlerImplTest.diff [ 12524383 ]
        Paul Nicolucci made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Paul Nicolucci made changes -
        Attachment NavigationHandlerImpl.txt [ 12523446 ]
        Attachment NavigationHandlerImplTest.txt [ 12523447 ]
        Attachment ViewExpiredException.war [ 12523448 ]
        Paul Nicolucci made changes -
        Field Original Value New Value
        Description When implementing a Custom ExceptionHandler to deal with ViewExpiredExceptions as suggested here: http://weblogs.java.net/blog/edburns/archive/2009/09/03/dealing-gracefully-viewexpiredexception-jsf2

        The implicit navigation to "viewExpired" does not work due to the fact that a "/" is not added to the "viewIdToTest" in NavigationHandlerImpl.getOutcomeNavigationCase. The algorithm was correct until we pulled in MYFACES-3101 to avoid
        a NullPointerException after a ViewExpiredException.

        The exception we see without the path is the following:

        [4/19/12 20:52:15:323 EDT] 00000028 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[Faces Servlet]: org.apache.myfaces.lifecycle.ViewNotFoundException: A view is required to execute RENDER_RESPONSE(6)
        at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:62)
        at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239)

        The view does exist but is no longer found since we don't add a "/" since the viewId is null.

        I've also added a couple of additional "null" checks that look to have been missed in MyFaces-3101.

        A test Application will be provided as well as a diff showing my changes to NavigationHandlerImpl.java and NavigationHandlerImplTest.java ( the ViewExpiredException test needs to look for /viewExpired not viewExpired after the fix...which to me seems correct )
        When implementing a Custom ExceptionHandler to deal with ViewExpiredExceptions as suggested here: http://weblogs.java.net/blog/edburns/archive/2009/09/03/dealing-gracefully-viewexpiredexception-jsf2

        The implicit navigation to "viewExpired" does not work due to the fact that a "/" is not added to the "viewIdToTest" in NavigationHandlerImpl.getOutcomeNavigationCase. The algorithm was correct until we pulled in MYFACES-3101 to avoid
        a NullPointerException after a ViewExpiredException.

        The exception we see without the patch is the following:

        [4/19/12 20:52:15:323 EDT] 00000028 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[Faces Servlet]: org.apache.myfaces.lifecycle.ViewNotFoundException: A view is required to execute RENDER_RESPONSE(6)
        at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:62)
        at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239)

        The view does exist but is no longer found since we don't add a "/" since the viewId is null.

        I've also added a couple of additional "null" checks that look to have been missed in MyFaces-3101.

        A test Application will be provided as well as a diff showing my changes to NavigationHandlerImpl.java and NavigationHandlerImplTest.java ( the ViewExpiredException test needs to look for /viewExpired not viewExpired after the fix...which to me seems correct )
        Paul Nicolucci created issue -

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            Paul Nicolucci
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 4h
              4h
              Remaining:
              Remaining Estimate - 4h
              4h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development