1 2 Previous Next 15 Replies Latest reply on Mar 31, 2006 12:51 AM by Gavin King

    I get Exception : No active application scope , how to resol

    legolas woodland Novice



      Hi
      Thank you for reading my post
      I am getting some exception when i am trying to navigate inot a jsp page that i used a seam
      component .
      the exception say:
      java.lang.IllegalStateException: No active application scope


      where should i look to resolve this problem ?

      I should say that , i tried to write entire application (web.xml , faces-config.xml)
      from the ground myself to learn more.

        • 1. Re: I get Exception : No active application scope , how to r
          jameswoodward Newbie

          Check your web.xml and faces-config.xml.

          web.xml should contain:

          <!-- JBoss Seam -->
           <listener>
           <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
           </listener>
          
           <context-param>
           <param-name>org.jboss.seam.core.init.jndiPattern</param-name>
           <param-value>myEarName/#{ejbName}/local</param-value>
           </context-param>
          
           <filter>
           <filter-name>SeamRedirectFilter</filter-name>
           <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
           </filter>
           <filter-mapping>
           <filter-name>SeamRedirectFilter</filter-name>
           <url-pattern>*.jsf</url-pattern>
           </filter-mapping>
          


          faces-config.xml should contain:
          <lifecycle>
           <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
           </lifecycle>
          


          • 2. Re: I get Exception : No active application scope , how to r
            legolas woodland Novice

            Hi
            Thank you for reply.
            here is my web.xml portion that i add to make this web.xml seam enabled.

            
            <filter>
             <filter-name>Seam Redirect Filter</filter-name>
             <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
             </filter>
            
             <filter-mapping>
             <filter-name>Seam Redirect Filter</filter-name>
             <url-pattern>/face/*</url-pattern>
             </filter-mapping>
            
             <!-- 120 second conversation timeout -->
             <context-param>
             <param-name>org.jboss.seam.core.manager.conversationTimeout</param-name>
             <param-value>120000</param-value>
             </context-param>
            
             <!-- Global JNDI name pattern for JBoss EJB3 (change for other servers) -->
             <context-param>
             <param-name>org.jboss.seam.core.init.jndiPattern</param-name>
             <param-value>jboss-seam-booking/#{ejbName}/local</param-value>
             </context-param>
            
            


            I should say that my face servlet mapping is like :
            <servlet>
             <servlet-name>Faces Servlet</servlet-name>
             <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
             <load-on-startup>1</load-on-startup>
             </servlet>
             <servlet-mapping>
             <servlet-name>Faces Servlet</servlet-name>
             <url-pattern>/faces/*</url-pattern>
             </servlet-mapping>
            


            and this is the code from my faces-config.xml
             <lifecycle>
             <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
             </lifecycle>
            
            
            


            I still get the same error.

            what is wrong ?

            • 4. Re: I get Exception : No active application scope , how to r
              legolas woodland Novice

              Hi
              Thanks for your help.
              I am using glassfish build40
              here is the stacktrace.

              [#|2006-03-24T12:59:33.562+0430|WARNING|sun-appserver-pe9.0|javax.enterprise.resource.webcontainer.jsf.lifecycle|_ThreadID=25;_ThreadName=httpWorkerThread-28080-0;_RequestID=e72df59f-60bf-4c0b-a1b5-7aa5601cae18;|executePhase(INVOKE_APPLICATION 5,com.sun.faces.context.FacesContextImpl@1513d1e) threw exception
              javax.faces.FacesException: No active application scope
               at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(Unknown Source)
               at com.sun.faces.lifecycle.LifecycleImpl.phase(Unknown Source)
               at com.sun.faces.lifecycle.LifecycleImpl.execute(Unknown Source)
               at javax.faces.webapp.FacesServlet.service(Unknown Source)
               at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:423)
               at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
               at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
               at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
               at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
               at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
               at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
               at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:181)
               at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
               at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
               at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
               at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
               at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
               at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
               at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
               at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:223)
               at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
               at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
               at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
               at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
               at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
               at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
               at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
              Caused by: java.lang.IllegalStateException: No active application scope
               at org.jboss.seam.core.Init.instance(Init.java:86)
               at org.jboss.seam.jsf.SeamNavigationHandler.handleNavigation(SeamNavigationHandler.java:23)
               at com.sun.faces.application.ActionListenerImpl.processAction(Unknown Source)
               at javax.faces.component.UICommand.broadcast(Unknown Source)
               at javax.faces.component.UIViewRoot.broadcastEvents(Unknown Source)
               at javax.faces.component.UIViewRoot.processApplication(Unknown Source)
               ... 28 more
              


              I included :
              All required jar files to the application and not any of myfaces stuff.
              from jboss , i included jboss-common and jboss-ejb3.jar to project.
              I think i have just required jar files in the project because i add each jar in one compilation/deployment phase until i get no more , class not found exception.


              Thanks again

              • 5. Re: I get Exception : No active application scope , how to r
                jameswoodward Newbie

                This is either a typo, or it may be your problem:

                <filter-mapping>
                 <filter-name>Seam Redirect Filter</filter-name>
                 <url-pattern>/face/*</url-pattern>
                 </filter-mapping>
                


                /face/*, should be /faces/*

                • 6. Re: I get Exception : No active application scope , how to r
                  legolas woodland Novice

                  Hi
                  Thank you very much.
                  I fixed the noticed mistake . now i get the same exception again.
                  I should say that it just happen when i navigate to the page that contain references to a seam component (register.jsp page)
                  Thanks

                  here is the stack trace again.

                  No active application scope
                  java.lang.IllegalStateException: No active application scope
                   at org.jboss.seam.core.Init.instance(Init.java:86)
                   at org.jboss.seam.jsf.SeamNavigationHandler.handleNavigation(SeamNavigationHandler.java:23)
                   at com.sun.faces.application.ActionListenerImpl.processAction(Unknown Source)
                   at javax.faces.component.UICommand.broadcast(Unknown Source)
                   at javax.faces.component.UIViewRoot.broadcastEvents(Unknown Source)
                   at javax.faces.component.UIViewRoot.processApplication(Unknown Source)
                   at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(Unknown Source)
                   at com.sun.faces.lifecycle.LifecycleImpl.phase(Unknown Source)
                   at com.sun.faces.lifecycle.LifecycleImpl.execute(Unknown Source)
                   at javax.faces.webapp.FacesServlet.service(Unknown Source)
                   at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:423)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
                   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
                   at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
                   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
                   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
                   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
                   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
                   at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
                   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
                   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
                   at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
                   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:181)
                   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
                   at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
                   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
                   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
                   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
                   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
                   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
                   at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:223)
                   at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
                   at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
                   at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
                   at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
                   at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
                   at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
                   at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
                  |#]
                  executePhase(INVOKE_APPLICATION 5,com.sun.faces.context.FacesContextImpl@171dc60) threw exception
                  javax.faces.FacesException: No active application scope
                   at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(Unknown Source)
                   at com.sun.faces.lifecycle.LifecycleImpl.phase(Unknown Source)
                   at com.sun.faces.lifecycle.LifecycleImpl.execute(Unknown Source)
                   at javax.faces.webapp.FacesServlet.service(Unknown Source)
                   at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:423)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
                   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
                   at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
                   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
                   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
                   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
                   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
                   at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
                   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
                   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
                   at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
                   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:181)
                   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
                   at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
                   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
                   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
                   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
                   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
                   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
                   at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:223)
                   at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
                   at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
                   at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
                   at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
                   at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
                   at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
                   at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
                  Caused by: java.lang.IllegalStateException: No active application scope
                   at org.jboss.seam.core.Init.instance(Init.java:86)
                   at org.jboss.seam.jsf.SeamNavigationHandler.handleNavigation(SeamNavigationHandler.java:23)
                   at com.sun.faces.application.ActionListenerImpl.processAction(Unknown Source)
                   at javax.faces.component.UICommand.broadcast(Unknown Source)
                   at javax.faces.component.UIViewRoot.broadcastEvents(Unknown Source)
                   at javax.faces.component.UIViewRoot.processApplication(Unknown Source)
                   ... 33 more
                  |#]
                  StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
                  java.lang.IllegalStateException: No active application scope
                   at org.jboss.seam.core.Init.instance(Init.java:86)
                   at org.jboss.seam.jsf.SeamNavigationHandler.handleNavigation(SeamNavigationHandler.java:23)
                   at com.sun.faces.application.ActionListenerImpl.processAction(Unknown Source)
                   at javax.faces.component.UICommand.broadcast(Unknown Source)
                   at javax.faces.component.UIViewRoot.broadcastEvents(Unknown Source)
                   at javax.faces.component.UIViewRoot.processApplication(Unknown Source)
                   at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(Unknown Source)
                   at com.sun.faces.lifecycle.LifecycleImpl.phase(Unknown Source)
                   at com.sun.faces.lifecycle.LifecycleImpl.execute(Unknown Source)
                   at javax.faces.webapp.FacesServlet.service(Unknown Source)
                   at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:423)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
                   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
                   at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
                   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
                   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
                   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
                   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
                   at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
                   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
                   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
                   at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
                   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:181)
                   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
                   at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
                   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
                   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
                   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
                   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
                   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
                   at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:223)
                   at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
                   at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
                   at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
                   at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
                   at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
                   at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
                   at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
                  |#]
                  


                  • 7. Re: I get Exception : No active application scope , how to r
                    Gavin King Master

                    So this is the JSF RI?

                    Are you using current Seam CVS?

                    • 8. Re: I get Exception : No active application scope , how to r
                      legolas woodland Novice

                      HI , I am using seam 1.0 beta 2
                      I am trying to deploy it on Glassfish.
                      GlassFish has jsf-ri builtin to itself , but i bundled myfaces that come with seam distrobution with my application.
                      i still can not resolve what is going wrong . i am trying to find something in glassFish forum , and if i find i will post back here , maybe some one else come to find such solution later.


                      Thank you very much for the help.

                      • 9. Re: I get Exception : No active application scope , how to r
                        legolas woodland Novice

                        so far , i find this issue
                        https://glassfish.dev.java.net/issues/show_bug.cgi?id=290
                        in glassfish issuzilla .
                        i am following to find the solution to deploy seam on glassfish :-)
                        is there any plan for another beta build of seam ?

                        Thanks

                        • 10. Re: I get Exception : No active application scope , how to r
                          Gavin King Master

                          You *must* use current Seam CVS if you want to run with the JSF RI.

                          • 11. Re: I get Exception : No active application scope , how to r
                            legolas woodland Novice

                            Thank you very much.
                            I am fetching files from CVS right now.
                            btw , will you release another beta or next step is seam final version?

                            • 12. Re: I get Exception : No active application scope , how to r
                              Gavin King Master

                              I did not originally plan a beta3, but my inclination is now to do one sometime in the next week or so. Let's see how we go...

                              • 13. Re: I get Exception : No active application scope , how to r
                                legolas woodland Novice

                                cheers .
                                Seam is one first framework after Struts that i am very eager to learn and use.
                                Thank you guy for this great product.

                                • 14. Re: I get Exception : No active application scope , how to r
                                  legolas woodland Novice

                                  Hi
                                  Is there any advancement about releasing a beta 3 ?


                                  Thanks

                                  1 2 Previous Next