org.apache.myfaces.lifecycle.ViewNotFoundException: A view is required to execute RENDER_RESPONSE(6)

Apache's JIRA Issue Tracker | Paul Nicolucci | 5 years ago
  1. 0

    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 )

    Apache's JIRA Issue Tracker | 5 years ago | Paul Nicolucci
    org.apache.myfaces.lifecycle.ViewNotFoundException: A view is required to execute RENDER_RESPONSE(6)

    1 unregistered visitors

    Root Cause Analysis

    1. org.apache.myfaces.lifecycle.ViewNotFoundException

      A view is required to execute RENDER_RESPONSE(6)

      at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute()
    2. Impl
      LifecycleImpl.render
      1. org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:62)
      2. org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239)
      2 frames