Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1178

ConversationAwareViewHandler throws ContextNotActiveException

    XMLWordPrintable

    Details

    • Workaround Description:
      Hide

      Do whatever possible to trigger the exception before rendreResponse phase.

      Show
      Do whatever possible to trigger the exception before rendreResponse phase.

      Description

      If exception is thrown during render response (JSF app) then ExceptionHandler (seam3) is notified after conversation context has been deactivated. If such exception handler wants to redirect to error page using following code:

      NavigationHandler navHandler = context.getApplication().getNavigationHandler();
      navHandler.handleNavigation(context, "", viewId+"?faces-redirect=true");

      then ConversationAwareViewHandler will get called on getActionURL(FacesContext facesContext, String viewId)
      which doesn't check if conversation context is active and calls conversation.isTransient, which in turn throws exception (context inactive).

      I'd say there should be no call to conversation if context is inactive.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                luksa Marko Lukša
                Reporter:
                blabno Bernard Labno
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: