1 Reply Latest reply on Mar 30, 2007 8:24 PM by Andrew

    Keep losing my conversation with A4J and one page

    Andrew Apprentice

      I keep losing my conversation when using a redirect.

      Environment:
      Seam 1.1.6
      A4J 1.1.0
      MyFaces 1.1.5

      Page flow:
      1) user hits landing page (conversation started from pages.xml)
      2) user clicks link (conversation still active, also a join=true used on action method)
      3) user fills out information and then clicks another link (action is a string, conversation is still running)
      4) custom navigation handler executes redirect using "facesContext.getExternalContext().redirect(page);" (conversation is still active -- and stored)
      5) New view is "restored"
      6) Render response is started and my pages.xml action method is called for the new page (returns success which doesn't match any rules)
      7) conversation stored
      8) Restore view is called again (this is a bad sign, not sure why this is happening)
      9) I get the message "No stored conversation, or concurrent call to the stored conversation" from Manager
      10) render response called again, but my page is now broken since the conversation ID has been lost.

      Log flow:

      DEBUG [BaseFilter] Filter start request processing at 3/30/07 5:45 PM for uri: /OSoft/pages/ContentMgmt/landing.jsf
      DEBUG [DebugPhaseListener] The phase RESTORE_VIEW(1) is about to start.
      DEBUG [Manager] Found conversation id in request parameter: 25
      DEBUG [Manager] Restoring conversation with id: 25
      DEBUG [DebugPhaseListener] The phase RESTORE_VIEW(1) has completed.
      DEBUG [DebugPhaseListener] The phase APPLY_REQUEST_VALUES(2) is about to start.
      DEBUG [DebugPhaseListener] The phase APPLY_REQUEST_VALUES(2) has completed.
      DEBUG [DebugPhaseListener] The phase PROCESS_VALIDATIONS(3) is about to start.
      DEBUG [DebugPhaseListener] The phase PROCESS_VALIDATIONS(3) has completed.
      DEBUG [DebugPhaseListener] The phase UPDATE_MODEL_VALUES(4) is about to start.
      DEBUG [DebugPhaseListener] The phase UPDATE_MODEL_VALUES(4) has completed.
      DEBUG [DebugPhaseListener] The phase INVOKE_APPLICATION(5) is about to start.
      DEBUG [ActionPaneBean] Checking action pane navigation for action 'nav.step2' and outcome 'nav.step2'. Current view is /pages/ContentMgmt/landing.xhtml and current action pane view is /pages/ContentMgmt/actionPane/editWebPage1.xhtml.
      DEBUG [ActionPaneBean] Redirecting:
       Parent View ID: /pages/ContentMgmt/editWebPage.xhtml
       Action View ID: /pages/ContentMgmt/actionPane/editWebPage2.xhtml
      DEBUG [NavigationHandlerImpl] handleNavigation fromAction=nav.step2 outcome=nav.step2 no matching navigation-case found, staying on current ViewRoot
      DEBUG [Manager] Storing conversation state: 25
      DEBUG [DebugPhaseListener] The phase INVOKE_APPLICATION(5) has completed.
      DEBUG [BaseXMLFilter] Create AJAX redirect response to url: /OSoft/pages/ContentMgmt/editWebPage.jsf?conversationId=25&conversationIsLongRunning=true
      DEBUG [BaseFilter] Finished request processing total time 504ms for uri: /OSoft/pages/ContentMgmt/landing.jsf
      DEBUG [BaseFilter] Filter start request processing at 3/30/07 5:45 PM for uri: /OSoft/pages/ContentMgmt/editWebPage.jsf
      DEBUG [DebugPhaseListener] The phase RESTORE_VIEW(1) is about to start.
      DEBUG [Manager] Found conversation id in request parameter: 25
      DEBUG [Manager] Restoring conversation with id: 25
      DEBUG [DebugPhaseListener] The phase RESTORE_VIEW(1) has completed.
      DEBUG [DebugPhaseListener] The phase RENDER_RESPONSE(6) is about to start.
      DEBUG [ActionPaneBean] Checking action pane navigation for action '#{webPageBean.onLoad}' and outcome 'success'. Current view is /pages/ContentMgmt/editWebPage.xhtml and current action pane view is /pages/ContentMgmt/actionPane/editWebPage2.xhtml.
      DEBUG [ActionPaneBean] Result is not configured for the action pane, delegating to faces navigation handler
      DEBUG [NavigationHandlerImpl] handleNavigation fromAction=#{webPageBean.onLoad} outcome=success no matching navigation-case found, staying on current ViewRoot
      DEBUG [Manager] Storing conversation state: 25
      DEBUG [DebugPhaseListener] The phase RENDER_RESPONSE(6) has completed.
      DEBUG [BaseFilter] Finished request processing total time 20083ms for uri: /OSoft/pages/ContentMgmt/editWebPage.jsf
      DEBUG [DebugPhaseListener] The phase RESTORE_VIEW(1) is about to start.
      DEBUG [Manager] No stored conversation, or concurrent call to the stored conversation
      DEBUG [DebugPhaseListener] The phase RESTORE_VIEW(1) has completed.
      DEBUG [DebugPhaseListener] The phase RENDER_RESPONSE(6) is about to start.
      DEBUG [Manager] Discarding conversation state: 26
      DEBUG [DebugPhaseListener] The phase RENDER_RESPONSE(6) has completed.
      


      I am a bit baffled by this. I am using the A4J AJAX links and even tried adding:
      <f:param name="conversationId" value="#{conversation.id}"/>
      <seam:conversationPropagation type="join"/>


      Any ideas on what may be going on?


        • 1. Re: Keep losing my conversation with A4J and one page
          Andrew Apprentice

          Some how it seemed like an error was getting processed. So I commented out the following from web.xml:

          <error-page>
           <error-code>500</error-code>
           <location>/displayError.jsf</location>
           </error-page>
           <error-page>
           <error-code>404</error-code>
           <location>/displayError.jsf</location>
           </error-page>
           <error-page>
           <exception-type>java.lang.Throwable</exception-type>
           <location>/displayError.jsf</location>
           </error-page>


          After doing that everything worked. I just have no clue at the moment why the error page was attempted to be loaded as there doesn't seem to have been any errors (page is working just fine without this).

          Anyone else experience this type of issue?