3 Replies Latest reply on Oct 7, 2009 4:55 PM by Arno Hernach

    Starting Pageflow endless loop

    Arno Hernach Newbie

      Hi all,
      I've got a problem starting my pageflow (newbie). I nearly tried everything to solve it (including Seam-reference, Dan Allans Seam in Action, Google etc.)...


      I'm using JBoss AS 4.2.2.GA and Seam 2.1.2...


      My little pageflow:




      <?xml version="1.0" encoding="UTF-8"?>
      
      <pageflow-definition xmlns="http://jboss.com/products/seam/pageflow"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="
      http://jboss.com/products/seam/pageflow
      http://jboss.com/products/seam/pageflow-2.0.xsd"
           name="orderProcessPageFlow">
      
           <start-state>
                <transition to="Customer Page" name="start"></transition>
           </start-state>
           <page name="Customer Page" view-id="/customer.xhtml" redirect="true">
                <transition to="isPostalDelivery" name="decide"></transition>
           </page>
           <page name="Address Page" view-id="/address.xhtml" redirect="true">
                <transition to="E-Mail Page" name="next"></transition>
           </page>
           <page name="E-Mail Page" view-id="/eMail.xhtml" redirect="true">
                <end-conversation />
           </page>
           <decision name="isPostalDelivery" expression="#{customerHome.isPostalDelivery}">
                <transition to="Address Page" name="yes"></transition>
                <transition name="no" to="E-Mail Page"></transition>
           </decision>
      </pageflow-definition>



      In home.xhtml I tried to start it:




      <s:button action="start" pageflow="orderProcessPageFlow"
                     propagation="join" value="Enter Application" />



      I also did not change anything in pages.xml that would effect one of the pages above.
      So when I click the button I get an endless loop of java.lang.IllegalStateException: pageflow is not currently at a (page) or (start-page) node...


      Here the full Stack trace:




      |13:29:49,273 ERROR [SeamPhaseListener] uncaught exception
      java.lang.IllegalStateException: pageflow is not currently at a <page> or <start-page> node (note that pageflows that begin during the RENDER_RESPONSE phase should use <start-page> instead of <start-state>)
           at org.jboss.seam.pageflow.Pageflow.getPage(Pageflow.java:232)
           at org.jboss.seam.faces.FacesManager.prepareBackswitch(FacesManager.java:252)
           at org.jboss.seam.jsf.SeamPhaseListener.afterRenderResponse(SeamPhaseListener.java:503)
           at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:245)
           at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:192)
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:65)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
           at java.lang.Thread.run(Thread.java:619)|



      I've found a similar post where the problem seems to be an EL-Expression and could be solved by Seam 2.1 but I already use it.
      In addition to that I tried both, start-state and start-page but it's always the same.
      I also tried to change the action-outcome from start to wrongOutcome but that also had no impact. It seems to me that the pageflow would never reach the start-state node?


      Hope anyone could help me out!