12 Replies Latest reply on Nov 15, 2006 5:16 AM by christophe.laumond

    IllegalStateException: No active application scope

    christophe.laumond

      Hi,

      I'm using JBoss Seam 1.0.1GA with Myfaces ( tested with 1.1.3 and 1.1.5 snapshot).

      I got this exception each time a page is rendering.


      ERROR [org.apache.myfaces.lifecycle.PhaseListenerManager] Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
      java.lang.IllegalStateException: No active application scope
      at org.jboss.seam.core.Init.instance(Init.java:48)
      at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:87)
      at org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener.afterPhase(SeamExtendedManagedPersistencePhaseListener.java:55)
      at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:131)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
      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.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)


      It looks like it doesn't prevent the application to run properly but I'm only at the beginning of the project and I'm afraid about issues in the future.

      Is someone know about this error ?

      Is this can be related about saving state between request ?
      Some classes not marked as serializable ?

      Any help would be really appreciated.

      Thanks in advance,

      Regards,
      Christophe

        • 1. Re: IllegalStateException: No active application scope
          jpviragine

          Check if your faces-config.xml has the following lines:

          <lifecycle>
           <phase-listener>
           org.jboss.seam.jsf.SeamPhaseListener
           </phase-listener>
          </lifecycle>






          • 2. Re: IllegalStateException: No active application scope
            christophe.laumond

            hi,

            Thanks for the feedback.

            my lifecycle tag in faces-config is the following :


            <lifecycle>
            <phase-listener>org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener</phase-listener>
            </lifecycle>


            Do you know the difference ?

            Regards,
            Christophe

            • 3. Re: IllegalStateException: No active application scope
              jpviragine

              Christophe,

              Please, look at: http://docs.jboss.com/seam/latest/reference/en/html/configuration.html#d0e4853

              In:
              http://www.jboss.com/index.html?module=bb&op=viewtopic&t=87857

              Gavin suggest:

              Check:

              (1) Your setting for org.jboss.seam.core.init.myFacesLifecycleBug
              (2) That you don't have two phase listeners enabled


              Regards,
              Joao Paulo

              • 4. Re: IllegalStateException: No active application scope
                christophe.laumond

                Thanks for your feedback !

                I have looked into the different links you gave me and do some changes according to them but I always got the exception :(

                Any other idea ?

                Otherwise I will investigate more with the information you gave me.

                Regards,
                Christophe

                • 5. Re: IllegalStateException: No active application scope
                  gavin.king

                  Just go back to the Seam examples, and start from there. The prolblem will be that you have some packaging or configuration that is different to the examples.

                  • 6. Re: IllegalStateException: No active application scope
                    neill_robbins

                    Christophe,

                    I don't know if you are still having this problem, but I also managed to get it.

                    The problem arose because I had both the JSF RI and the MyFaces api and impl jars in my webb app WEB-INF/lib

                    I'm guessing therefore that it was a classpath issue.

                    If you have the same situation, remove one set of Faces implementations from your war (making sure that the web.xml using the right context loader listener) and you should be OK.

                    I have tested on JSF RI 1.2_02.b03 (i.e. remove the MyFaces impl) and it worked ok for me after that. Note I also had jbossHasMyFacesLifecycleBug set to false.

                    Good luck!

                    Regards
                    Neill

                    • 7. Re: IllegalStateException: No active application scope
                      psinger

                      I am having the same problem. I am using:


                      JBoss AS 4.0.4 GA
                      Seam 1.0.1
                      MyFaces 1.1.4
                      MyFaces Tomahawk 1.1.3
                      Struts Tiles 1.3.5
                      JSF Facelets 1.1.11


                      In faces-config.xml I have
                       <application>
                       <view-handler>org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl</view-handler>
                       </application>
                      
                       <lifecycle>
                       <phase-listener>org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener</phase-listener>
                       </lifecycle>
                      


                      In web.xml I have
                       <listener>
                       <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
                       </listener>
                       <listener>
                       <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
                       </listener>
                      


                      In components.xml I have
                       <component name="org.jboss.seam.core.init">
                       <property name="debug">true</property>
                       <property name="myFacesLifecycleBug">false</property>
                       <property name="jndiPattern">myApp/#{ejbName}/local</property>
                       </component>
                      


                      I see the following in my console.
                      10:22:47,485 ERROR [PhaseListenerManager] Exception in PhaseListener RESTORE_VIEW(1) afterPhase
                      java.lang.NullPointerException
                       at org.jboss.seam.contexts.PageContext.getCurrentReadableMap(PageContext.java:62)
                       at org.jboss.seam.contexts.PageContext.get(PageContext.java:52)
                       at org.jboss.seam.core.Manager.restoreConversation(Manager.java:501)
                       at org.jboss.seam.jsf.AbstractSeamPhaseListener.restoreAnyConversationContext(AbstractSeamPhaseListener.java:41)
                       at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:63)
                       at org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener.afterPhase(SeamExtendedManagedPersistencePhaseListener.java:55)
                       at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
                       at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:181)
                       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
                       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
                       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                       at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
                       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.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.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)
                      10:22:47,657 INFO [Pages] reading pages.xml
                      10:22:58,346 ERROR [PhaseListenerManager] Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
                      java.lang.IllegalStateException: No active application scope
                       at org.jboss.seam.core.Init.instance(Init.java:48)
                       at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:87)
                       at org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener.afterPhase(SeamExtendedManagedPersistencePhaseListener.java:55)
                       at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
                       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:391)
                       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
                       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                       at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
                       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.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.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)
                      


                      • 8. Re: IllegalStateException: No active application scope
                        psinger

                        I found my problem.

                        In web.xml I had

                         <context-param>
                         <param-name>javax.faces.CONFIG_FILES</param-name>
                         <param-value>
                         /WEB-INF/faces-config.xml
                         </param-value>
                         </context-param>
                        


                        Since faces-config.xml is read by default, this meant that my faces-config.xml file was read twice. Once I changed this to
                         <context-param>
                         <param-name>javax.faces.CONFIG_FILES</param-name>
                         <param-value>
                         </param-value>
                         </context-param>
                        

                        my problem went away. This configuration parameter is for extra configuration files and should not include the default faces-config.xml.

                        • 9. Re: IllegalStateException: No active application scope
                          gavin.king

                          Right, and this problem is listed in the FAQ:

                          http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamProblemsFAQ

                          • 10. Re: IllegalStateException: No active application scope
                            christophe.laumond

                            hi.

                            thanks everybody for your feedback.

                            Unfortunately, I have not been able to figure out what is the problem yet...

                            So sorry for the very long post which is following but I really need help.

                            thanks in advance for feedback.

                            best regards.
                            Christophe

                            jboss-4.0.4.GA installed with jems ejb3-profile
                            jboss-seam-1.0.1.GA
                            myfaces 1.1.5-SNAPSHOT
                            tomahawk 1.1.5-SNAPSHOT
                            tomahawk sandbox-1.1.5-SNAPSHOT
                            JSF Facelets 1.1.5
                            

                            in jboss-4.0.4.GA-jems\server\default\deploy\jbossweb-tomcat55.sar\jsf-libs

                            commons-beanutils-1.7.0.jar
                            commons-codec-1.3.jar
                            commons-collections.jar
                            commons-digester-1.6.jar
                            commons-fileupload-1.0.jar
                            commons-lang-2.1.jar
                            jstl.jar
                            myfaces-api-1.1.5-SNAPSHOT.jar
                            myfaces-impl-1.1.5-SNAPSHOT.jar
                            tomahawk-1.1.5-SNAPSHOT.jar
                            tomahawk-sandbox-1.1.5-SNAPSHOT.jar
                            


                            C:\JavaDev\jboss-4.0.4.GA-jems\server\default\deploy\jbossweb-tomcat55.sar\conf

                            web.xml

                            the only thing I changed is :
                            <init-param>
                             <description>MyFaces tlds</description>
                             <param-name>tagLibJar0</param-name>
                             <param-value>jsf-libs/myfaces-impl-1.1.5-SNAPSHOT.jar</param-value>
                            </init-param>
                            


                            in jboss-4.0.4.GA-jems\server\default\tmp\deploy\tmp23873seamapp.ear-contents\

                            in seamapp.ejb3-contents

                            jboss-seam.jar

                            in META-INF

                            application.xml
                            <application>
                             <display-name>Accounting Audit Web Application</display-name>
                             <module>
                             <web>
                             <web-uri>seamapp.war</web-uri>
                             <context-root>/audit</context-root>
                             </web>
                             </module>
                             <module>
                             <ejb>seamapp.ejb3</ejb>
                             </module>
                             <!-- Select Items Annotation JAR -->
                             <module>
                             <ejb>selectitems.jar</ejb>
                             </module>
                            </application>
                            

                            jboss-app.xml
                            <jboss-app>
                             <module>
                             <service>jboss-service.xml</service>
                             </module>
                             <loader-repository>seam.jboss.org:loader=seam-seamapp</loader-repository>
                            </jboss-app>
                            

                            in seamapp-exp.war\

                            in WEB-INF\lib
                            ajax4jsf.jar
                            EasySI-0.9.0.jar
                            el-api.jar
                            el-ri.jar
                            jboss-seam-debug.jar
                            jboss-seam-ui.jar
                            jsf-facelets.jar
                            oscache-2.3.2.jar
                            tagHandlers-0.9.jar
                            

                            in WEB-INF

                            components.xml
                            <components>
                             <component name="org.jboss.seam.core.init">
                             <property name="myFacesLifecycleBug">true</property>
                             <property name="jndiPattern">seamapp/#{ejbName}/local</property>
                             </component>
                             <component name="entityManager" class="org.jboss.seam.core.ManagedPersistenceContext">
                             <property name="persistenceUnitJndiName">java:/seamappEntityManagerFactory</property>
                             </component>
                             <component name="org.jboss.seam.core.manager">
                             <property name="conversationTimeout">120000</property>
                             </component>
                            
                             <component name="resourceBundle">
                             <property name="bundleName">messages</property>
                             </component>
                            </components>
                            


                            faces-config.xml
                            <faces-config>
                             <application>
                             <variable-resolver>org.jboss.seam.jsf.SeamVariableResolver</variable-resolver>
                             <message-bundle>messages</message-bundle>
                             <locale-config>
                             <default-locale>en</default-locale>
                             <supported-locale>en</supported-locale>
                             </locale-config>
                             </application>
                             <lifecycle>
                             <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
                             </lifecycle>
                            </faces-config>
                            

                            sandbox.taglib.xml
                            tomahawk.taglib.xml

                            web.xml
                            <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
                             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                             xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
                             version="2.4">
                             <listener>
                             <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
                             </listener>
                             <listener>
                             <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
                             </listener>
                             <!-- tomahawk example -->
                             <context-param>
                             <description>Comma separated list of URIs of (additional) faces config files.
                             (e.g. /WEB-INF/my-config.xml)
                             See JSF 1.0 PRD2, 10.3.2
                             Attention: You do not need to put /WEB-INF/faces-config.xml in here.
                             </description>
                             <param-name>javax.faces.CONFIG_FILES</param-name>
                             <param-value>/WEB-INF/examples-config.xml</param-value>
                             </context-param>
                             <context-param>
                             <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                             <param-value>client</param-value>
                             </context-param>
                             <context-param>
                             <param-name>facelets.DEVELOPMENT</param-name>
                             <param-value>true</param-value>
                             </context-param>
                             <context-param>
                             <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                             <param-value>.xhtml</param-value>
                             </context-param>
                             <!-- tomahawk samples -->
                             <context-param>
                             <description>This parameter tells MyFaces if javascript code should be allowed in the
                             rendered HTML output.
                             If javascript is allowed, command_link anchors will have javascript code
                             that submits the corresponding form.
                             If javascript is not allowed, the state saving info and nested parameters
                             will be added as url parameters.
                             Default: "true"</description>
                             <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
                             <param-value>true</param-value>
                             </context-param>
                             <context-param>
                             <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
                             <param-value>false</param-value>
                             </context-param>
                             <context-param>
                             <description>If true, rendered HTML code will be formatted, so that it is "human readable".
                             i.e. additional line separators and whitespace will be written, that do not
                             influence the HTML code.
                             Default: "true"</description>
                             <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
                             <param-value>true</param-value>
                             </context-param>
                             <context-param>
                             <description>If true, a javascript function will be rendered that is able to restore the
                             former vertical scroll on every request. Convenient feature if you have pages
                             with long lists and you do not want the browser page to always jump to the top
                             if you trigger a link or button action that stays on the same page.
                             Default: "false"</description>
                             <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
                             <param-value>true</param-value>
                             </context-param>
                            
                             <context-param>
                             <description>
                             Validate managed beans, navigation rules and ensure that forms are not nested.
                             </description>
                             <param-name>org.apache.myfaces.VALIDATE</param-name>
                             <param-value>false</param-value>
                             </context-param>
                            
                             <context-param>
                             <description>A class implementing the
                             org.apache.myfaces.shared.renderkit.html.util.AddResource
                             interface. It is responsible to
                             place scripts and css on the right position in your HTML document.
                             Default: "org.apache.myfaces.shared.renderkit.html.util.DefaultAddResource"
                             Follow the description on the MyFaces-Wiki-Performance page to enable
                             StreamingAddResource instead of DefaultAddResource if you want to
                             gain performance.
                             </description>
                             <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
                             <param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value>
                             <!--param-value>org.apache.myfaces.component.html.util.StreamingAddResource</param-value-->
                             </context-param>
                            
                             <context-param>
                             <description>
                             A very common problem in configuring MyFaces-web-applications
                             is that the Extensions-Filter is not configured at all
                             or improperly configured. This parameter will check for a properly
                             configured Extensions-Filter if it is needed by the web-app.
                             In most cases this check will work just fine, there might be cases
                             where an internal forward will bypass the Extensions-Filter and the check
                             will not work. If this is the case, you can disable the check by setting
                             this parameter to false.
                             </description>
                             <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
                             <param-value>true</param-value>
                             </context-param>
                             <!-- -->
                            
                             <!-- tomahawk -->
                             <context-param>
                             <param-name>facelets.LIBRARIES</param-name>
                             <param-value>/WEB-INF/tomahawk.taglib.xml</param-value>
                             </context-param>
                             <!-- end tomahawk -->
                            
                            
                             <filter>
                             <filter-name>Seam Exception Filter</filter-name>
                             <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
                             </filter>
                            
                             <filter>
                             <filter-name>Seam Redirect Filter</filter-name>
                             <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
                             </filter>
                            
                             <!-- tomahawk -->
                             <filter>
                             <filter-name>MyFacesExtensionsFilter</filter-name>
                             <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
                             <init-param>
                             <param-name>maxFileSize</param-name>
                             <param-value>20m</param-value>
                             <description>Set the size limit for uploaded files.
                             Format: 10 - 10 bytes
                             10k - 10 KB
                             10m - 10 MB
                             1g - 1 GB
                             </description>
                             </init-param>
                            </filter>
                             <!-- end tomahawk -->
                            
                            <!-- Ajax4jsf -->
                             <filter>
                             <display-name>Ajax4jsf Filter</display-name>
                             <filter-name>ajax4jsf</filter-name>
                             <filter-class>org.ajax4jsf.Filter</filter-class>
                             </filter>
                             <filter-mapping>
                             <filter-name>ajax4jsf</filter-name>
                             <url-pattern>*.seam</url-pattern>
                             </filter-mapping>
                            
                            
                             <context-param>
                             <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
                             <param-value>com.sun.facelets.FaceletViewHandler</param-value>
                             </context-param>
                            
                            
                             <filter-mapping>
                             <filter-name>Seam Exception Filter</filter-name>
                             <url-pattern>/*</url-pattern>
                             </filter-mapping>
                            
                             <filter-mapping>
                             <filter-name>Seam Redirect Filter</filter-name>
                             <url-pattern>*.seam</url-pattern>
                             </filter-mapping>
                            
                             <!-- tomahawk -->
                             <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages -->
                             <filter-mapping>
                             <filter-name>MyFacesExtensionsFilter</filter-name>
                             <!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
                             <servlet-name>Faces Servlet</servlet-name>
                             </filter-mapping>
                            
                             <!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) -->
                             <filter-mapping>
                             <filter-name>MyFacesExtensionsFilter</filter-name>
                             <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
                             </filter-mapping>
                             <!-- end tomahawk -->
                            
                             <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>*.seam</url-pattern>
                             </servlet-mapping>
                            
                             <!-- tomahawk -->
                             <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages -->
                             <filter-mapping>
                             <filter-name>MyFacesExtensionsFilter</filter-name>
                             <url-pattern>*.jsf</url-pattern>
                             </filter-mapping> <!-- end tomahawk -->
                            
                            </web-app>
                            


                            The exception
                            2006-10-31 15:11:37,906 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] ************** closing entity managersession **************
                            2006-10-31 15:11:37,906 DEBUG [org.hibernate.jdbc.JDBCContext] TransactionFactory reported no active transaction; Synchronization not registered
                            2006-10-31 15:11:37,921 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@1afc0f5, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@480174{ url=null ,addedOrder=0}
                            2006-10-31 15:11:37,921 DEBUG [org.jboss.seam.core.Manager] Storing conversation state: 9
                            2006-10-31 15:11:37,921 DEBUG [org.jboss.seam.Component] instantiating Seam component: conversation
                            2006-10-31 15:11:37,921 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing page context
                            2006-10-31 15:11:37,921 DEBUG [org.jboss.seam.contexts.Lifecycle] After render response, destroying contexts
                            2006-10-31 15:11:37,921 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying event context
                            2006-10-31 15:11:37,921 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.manager
                            2006-10-31 15:11:37,921 DEBUG [org.jboss.seam.contexts.Contexts] destroying: class org.apache.myfaces.shared_tomahawk.renderkit.html.util.JavascriptUtils.OLD_VIEW_ID
                            2006-10-31 15:11:37,921 DEBUG [org.jboss.seam.contexts.Contexts] destroying: accessedBeans
                            2006-10-31 15:11:37,921 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.apache.myfaces.config.beansUnderConstruction
                            2006-10-31 15:11:37,921 DEBUG [org.jboss.seam.contexts.Contexts] destroying: com.exade.vcp.Filter.done
                            2006-10-31 15:11:37,921 DEBUG [org.jboss.seam.contexts.Contexts] destroying: ajaxContext
                            2006-10-31 15:11:37,921 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.apache.myfaces.AddResourceFactory.CACHE_MAP_KEY
                            2006-10-31 15:11:37,921 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.ajax4jsf.CURRENT_PHASE
                            2006-10-31 15:11:37,921 DEBUG [org.jboss.seam.contexts.Contexts] destroying: com.exade.vcp.Filter.ResponseWrapper
                            2006-10-31 15:11:37,921 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.apache.myfaces.component.html.util.ExtensionFilter.doFilterCalled
                            2006-10-31 15:11:37,937 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing server-side conversation context
                            2006-10-31 15:11:37,937 DEBUG [org.jboss.seam.contexts.Lifecycle] <<< End web request
                            2006-10-31 15:11:37,937 ERROR [org.apache.myfaces.lifecycle.PhaseListenerManager] Exception in PhaseListener RENDER_RESPONSE(6) afterPhase
                            java.lang.IllegalStateException: No active application scope
                             at org.jboss.seam.core.Init.instance(Init.java:48)
                             at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:87)
                             at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
                             at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:131)
                             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
                             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                             at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
                             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.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.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:67)
                             at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:223)
                             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)
                            2006-10-31 15:11:37,937 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
                            2006-10-31 15:11:37,937 DEBUG [org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter] Finished request processing total time 344ms for uri: /audit/searchCompany.seam
                            2006-10-31 15:11:37,937 DEBUG [org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter] Filter start request processing at 31/10/06 15:11 for uri: /audit/overview.seam
                            2006-10-31 15:11:37,937 DEBUG [org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter] Filter request output to XML
                            2006-10-31 15:11:37,937 DEBUG [org.jboss.seam.contexts.Lifecycle] >>> Begin web request
                            2006-10-31 15:11:37,937 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.manager
                            2006-10-31 15:11:37,937 DEBUG [org.jboss.seam.core.Manager] Found conversation id in request parameter: 9
                            2006-10-31 15:11:37,937 DEBUG [org.jboss.seam.core.Manager] Restoring conversation with id: 9
                            2006-10-31 15:11:37,937 DEBUG [org.jboss.seam.contexts.Contexts] found in application context: org.jboss.seam.core.init
                            2006-10-31 15:11:37,937 DEBUG [org.jboss.seam.jsf.AbstractSeamPhaseListener] After restoring conversation context: ConversationContext(9)
                            



                            • 11. Re: IllegalStateException: No active application scope
                              gavin.king

                              (1) Remove this line from components.xml:

                              <property name="myFacesLifecycleBug">true</property>


                              (2) Remove all the Tomahawk crap.

                              (3) If that is not enough to solve the problem, replace your SNAPSHOT builds of stuff with the supported versions which ship with JBoss 4.0.5 and Seam 1.1.BETA1.

                              • 12. Re: IllegalStateException: No active application scope
                                christophe.laumond

                                hi Gavin,

                                Thank you very much.

                                I simply removed the line from components.xml and it works fine now.

                                regards,
                                Christophe