5 Replies Latest reply on Oct 23, 2010 2:03 PM by Leonardo Nascimento

    Page navigation exceptions after upgrading to JSF 2

    Gus Gu Expert

      Hi there,


      After I upgraded to JSF 2, I got the following exception when I clicked LOGIN or SIGN UP button. Following are the codes and exceptions. (Seam 2.2.1.CR1, JSF 2.0.2, PrimeFaces 2.0)


      Thank you very much for any help.


      login.xhtml:


      <h:commandButton value="LOGIN" action="#{identity.login}"/>
      <h:commandButton value="SIGN UP!" action="register" immediate="true"/>


      login.page.xml:


      <?xml version="1.0" encoding="UTF-8"?>
      <page xmlns="http://jboss.com/products/seam/pages"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd">
         
          <end-conversation before-redirect="true" root="true"/>
         
         <navigation from-action="#{identity.login}">
            <rule if="#{identity.loggedIn}">
               <end-conversation before-redirect="true" root="true"/>
               <redirect view-id="/home.xhtml" />
      
            </rule>
         </navigation>
         
         <navigation from-action="register">
            <begin-conversation join="false"/>
            <redirect view-id="/register.xhtml" />
         </navigation>
      </page>
      


      Exceptions:


      11:13:05,187 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      java.lang.IllegalStateException
      at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:435)
      at org.jboss.seam.mock.MockExternalContext.redirect(MockExternalContext.java:528)
      at org.jboss.seam.faces.FacesManager.redirect(FacesManager.java:220)
      at org.jboss.seam.faces.FacesManager.redirect(FacesManager.java:185)
      at org.jboss.seam.faces.Navigator.redirect(Navigator.java:55)
      at org.jboss.seam.faces.Navigator.redirect(Navigator.java:42)
      at org.jboss.seam.exception.RedirectHandler.handle(RedirectHandler.java:51)
      at org.jboss.seam.exception.Exceptions.handle(Exceptions.java:76)
      at org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:114)
      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:70)
      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:235)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      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:158)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:595)