6 Replies Latest reply on May 3, 2007 7:25 PM by Shane Bryzak

    Seam complained

    Tony Mai Apprentice

      Hello,

      I have a very simple login page that uses Seam's Identity. The first time I invoke this page, I saw the following log entry:

      18:51:44,000 INFO [ServletCacheAdministrator] Created new instance of ServletCacheAdministrator
      18:51:44,000 INFO [ServletCacheAdministrator] Created new application-scoped cache at key: __oscache_cache
      18:51:44,078 ERROR [STDERR] May 2, 2007 6:51:44 PM com.sun.faces.lifecycle.ELResolverInitPhaseListener populateFacesELResolverForJsp
      INFO: JSF1027: [null] The ELResolvers for JSF were not registered with the JSP container.
      18:51:44,093 INFO [Lifecycle] starting up: org.jboss.seam.security.identity
      18:51:44,578 ERROR [SeamPhaseListener] uncaught exception
      java.lang.IllegalStateException: No active conversation context

      at org.jboss.seam.core.FacesMessages.instance(FacesMessages.java:417)
      at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:226)
      at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:56)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:215)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
      at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
      at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
      at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
      at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
      at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
      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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
      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.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      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(Unknown Source)


      Does anyone have any idea about this error?

      Thanks

        • 1. Re: Seam complained
          Shane Bryzak Master

          Which version of Seam is this, and which environment is it running in? Have you tried to generate a new project with Seam-gen? It will implement all the necessary security configuration and classes for authentication.

          • 2. Re: Seam complained about Identity
            Tony Mai Apprentice

            I am using Seam 1.2.1GA with JBoss AS 4.0.5GA, JSF 1.2. The project was generated with seam-gen.

            Here is a snippet of my login.xhtml page:

            <div>
             <label jsfc="h:outputLabel" for="loginID">#{res['login.loginId.label']}</label>
             <input jsfc="h:inputText" type="text" name="loginID" id="loginID"
             value="#{identity.username}" />
            </div>
            <br />
            <div>
             <label jsfc="h:outputLabel" for="password">#{res['login.password.label']}</label>
             <input jsfc="h:inputSecret" type="password" name="password"
             id="password" value="#{identity.password}" />
            </div>
            <div id="logonBtn" class="button">
             <b><a href="#" jsfc="h:commandLink" action="#{identity.login}" title="#{res['login.loginBtn.title']}">#{res['login.loginBtn.label']}</a></b>
            </div>


            And here is a snippet of pages.xml:
            <!-- Once logged in, if user wants to go to the login page, redirect to pending orders -->
            <page view-id="/login.xhtml" action="#{authenticator.checkIfLogedIn}">
             <navigation from-action="#{authenticator.checkIfLogedIn}">
             <rule if="#{identity.loggedIn}">
             <redirect view-id="/pending_orders.xhtml"/>
             </rule>
             </navigation>
             <navigation from-action="#{identity.login}">
             <rule if="#{identity.loggedIn}">
             <redirect view-id="/pending_orders.xhtml"/>
             </rule>
             </navigation>
            </page>
            
            <!-- Upon successful login, redirect to pending orders page -->
            <page view-id="/login.xhtml">
             <navigation from-action="#{identity.login}">
             <rule if-outcome="success">
             <redirect view-id="/pending_orders.xhtml"/>
             </rule>
             </navigation>
            </page>
            
            <!-- After logged out, redisplay the login page -->
            <page view-id="*">
             <navigation from-action="#{identity.logout}">
             <redirect view-id="/login.xhtml"/>
             </navigation>
            </page>
            


            I know it's very verbose. Sorry about that and thanks for your help.


            • 3. Re: Seam complained
              Tony Mai Apprentice

              I took everything out of the login.xhtml page and all things referencing to identity in the pages.xml and am still running into this exception.

              Any idea on where else to look for?

              • 4. Re: Seam complained
                Hung Tang Apprentice

                A little off-topic here but the latest cvs update complains that Identity don't have securityRules. This causes startup errors.

                • 5. Re: Seam complained
                  Shane Bryzak Master

                   

                  "tonylmai" wrote:
                  I took everything out of the login.xhtml page and all things referencing to identity in the pages.xml and am still running into this exception.

                  Any idea on where else to look for?


                  Does it work using MyFaces?


                  • 6. Re: Seam complained
                    Shane Bryzak Master

                     

                    "hstang" wrote:
                    A little off-topic here but the latest cvs update complains that Identity don't have securityRules. This causes startup errors.


                    Could you please post the stack trace?