6 Replies Latest reply on Jul 11, 2006 9:24 PM by Gavin King

    conversation and back buttons

    nepoez nugget Newbie

      When i have a conversation that already started(by invoking method annotated with @begin, and

      1.) I press back button and
      2.) click on a submit button, it brings me back to the page where the current state should be, this it shows a message "Illegal navigation" this is fine, it's the page where the user should be.
      3.) i click any button

      However, now it bombs out. I must be doing something wrong as the tutorial had stated that free navigation is supported and handled.

      Here is the exception:

      javax.servlet.ServletException: No active conversation context
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      13:51:16,153 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      java.lang.IllegalStateException: No active conversation context
       at org.jboss.seam.core.Process.instance(Process.java:32)
       at org.jboss.seam.core.TaskInstance.instance(TaskInstance.java:51)
       at org.jboss.seam.contexts.BusinessProcessContext.getTaskInstance(BusinessProcessContext.java:213)
       at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:51)
       at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:155)
       at org.jboss.seam.Component.getInstance(Component.java:1245)
       at org.jboss.seam.Component.getInstance(Component.java:1230)
       at org.jboss.seam.contexts.Lifecycle.resumeConversation(Lifecycle.java:328)
       at org.jboss.seam.jsf.AbstractSeamPhaseListener.restoreAnyConversationContext(AbstractSeamPhaseListener.java:42)
       at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:63)
       at org.apache.myfaces.lifecycle.LifecycleImpl.informPhaseListenersAfter(LifecycleImpl.java:536)
       at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:164)
       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      
      


      here is my session bean, where "@Conversational(ifNotBegunOutcome = "registerUserPage")
      " is supposed to bring the user to the appropriate jsp specified by the nav rule "registerUserPage.:
      
      @Stateful
      @Name("registerUserAction")
      @Scope(ScopeType.CONVERSATION)
      @Conversational(ifNotBegunOutcome = "registerUserPage")
      
      public class RegisterUserAction implements Register {
      
       private Users user;
      
       private String password;
      
       @PersistenceContext
       private EntityManager em;
      
       @Logger
       private Log log;
      
       @Begin(join=true, pageflow = "registerUserPageFlow")
       public void begin() {
       if(user==null){
       log.info("Start");
       user=new Users();
       }
       }
       ...........
      }
      


      my jpdl:
      <?xml version="1.0"?>
      
      <pageflow-definition name="registerUserPageFlow">
       <start-state name="start">
       <transition to="emailForm"/>
       </start-state>
      
       <page name="emailForm" view-id="/register.xhtml">
       <redirect/>
       <transition name="register" to="validateInfo"/>
       </page>
      
       <decision name="validateInfo" expression="#{registerUserAction.validForm}">
       <transition name="false" to="emailForm"></transition>
       <transition name="true" to="passwordForm"></transition>
       </decision>
       <page name="passwordForm" view-id="/passwordForm.xhtml">
       <redirect/>
       <transition name="submit" to="validatePassword"></transition>
       <transition name="cancel" to="emailForm">
       <action expression="#{registerUserAction.restart}"/>
       </transition>
       </page>
       <decision name="validatePassword" expression="#{registerUserAction.validPassword}">
       <transition name="false" to="passwordForm"></transition>
       <transition name="true" to="success"></transition>
       </decision>
       <page name="success" view-id="/success.xhtml">
       <redirect/>
       <end-conversation/>
       </page>
      
      </pageflow-definition>