0 Replies Latest reply on Oct 17, 2013 5:27 AM by devendra sisodia

    EAP6.1 migration issue: swallowing exception: java.lang.IllegalStateException: No active application scope

    devendra sisodia Newbie

      I am facing below while performing upgrade of seam 2.2.2, jsf1.2 application to EAP 6.1. Application is getting deployed successfully and landing page is also displayed in  browser. User authentication is happening but after that when application forwards to home page it throws exception ``swallowing exception: java.lang.IllegalStateException: No active application scope``

      Config files are described here:

      ------------------------------------------------------------------------------------------------------------

      1. Component.xml

      <?xml version="1.0" encoding="UTF-8"?>

      <components xmlns="http://jboss.com/products/seam/components"

          xmlns:core="http://jboss.com/products/seam/core" xmlns:drools="http://jboss.com/products/seam/drools"

          xmlns:international="http://jboss.com/products/seam/international"

          xmlns:theme="http://jboss.com/products/seam/theme" xmlns:mail="http://jboss.com/products/seam/mail"

          xmlns:persistence="http://jboss.com/products/seam/persistence"

          xmlns:security="http://jboss.com/products/seam/security" xmlns:web="http://jboss.com/products/seam/web"

          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

          xsi:schemaLocation="http://jboss.com/products/seam/core

                          http://jboss.com/products/seam/core-2.2.xsd                 

                          http://jboss.com/products/seam/international

                          http://jboss.com/products/seam/international-2.2.xsd

                          http://jboss.com/products/seam/theme

                          http://jboss.com/products/seam/theme-2.2.xsd

                          http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.2.xsd

                          http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.2.xsd

                          http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.2.xsd

                          http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.2.xsd

                          http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.2.xsd

                          http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.2.xsd

                          http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.2.xsd">

       

           <core:init debug="true" jndi-pattern="@jndiPattern@" />

          <core:manager concurrent-request-timeout="30000"

              conversation-id-parameter="cid" conversation-timeout="120000"

              parent-conversation-id-parameter="pid" />

          <!-- Make sure this URL pattern is the same as that used by the Faces Servlet -->

         

          <web:hot-deploy-filter url-pattern="*.seam" />

         

          <persistence:managed-persistence-context

              auto-create="true" name="entityManager" persistence-unit-jndi-name="java:/sdp-model-EntityManagerFactory" />

         

          <!-- drools:rule-base name="securityRules">

              <drools:rule-files>

                  <value>/security.drl</value>

              </drools:rule-files>

          </drools:rule-base-->

         

          <security:rule-based-permission-resolver security-rules="#{securityRules}" />

          <security:identity authenticate-method="#{authenticator.authenticate}" remember-me="true" />

         

          <event type="org.jboss.seam.security.notLoggedIn">

              <action execute="#{redirect.captureCurrentView}" />

          </event>

         

          <event type="org.jboss.seam.security.loginSuccessful">

              <action execute="#{redirect.returnToCapturedView}" />

          </event>

         

          <mail:mail-session session-jndi-name="java:/Mail" />

          <international:locale-config

              default-locale="en" supported-locales="en fr de" startup="true"

              auto-create="true" />

         

          <theme:theme-selector available-themes="tata telus"

              theme="tata" cookie-enabled="true" auto-create="true" installed="true" />

       

       

          <component name="enterprise" class="com.tatacommunications.tp.model.account.Enterprise">

          </component>

          <component class="org.jboss.seam.transaction.EjbSynchronizations"

                  jndi-name="java:app/jboss-seam/EjbSynchronizations"/>

          <component class="org.jboss.seam.async.TimerServiceDispatcher"

                  jndi-name="java:app/jboss-seam/TimerServiceDispatcher"/>

      </components>

      ------------------------------------------------------------------------------------------------------------

      2.jboss-deployment-descriptor.xml

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">

          <deployment>

          <exclusions>      

              <module name="javax.faces.api" slot="main" />

                  <module name="com.sun.jsf-impl" slot="main" />

                  <module name="org.hibernate" slot="main" />

                  <module name="org.hibernate.validator" slot="main"/>

          </exclusions>

          <dependencies>

                  <module name="javax.faces.api" slot="1.2" export="true" />

                  <module name="com.sun.jsf-impl" slot="1.2" export="true" />

                  <module name="org.apache.commons.logging" export="true" />

                  <module name="org.dom4j" export="true" />

                  <module name="org.apache.commons.collections" export="true" />

                  <module name="org.hibernate" slot="3" />

              </dependencies>

          </deployment>

          <sub-deployment name="sdp-gui.war">

              <exclusions>

                  <module name="javax.faces.api" slot="main" />

                  <module name="com.sun.jsf-impl" slot="main" />

                  <module name="org.hibernate" slot="main" />

                  <module name="org.hibernate.validator" slot="main"/>

              </exclusions>

              <dependencies>

                  <module name="javax.faces.api" slot="1.2" />

                  <module name="com.sun.jsf-impl" slot="1.2" />

                  <module name="org.hibernate" slot="3" />

              </dependencies>

          </sub-deployment>

          <sub-deployment name="sdp-gui-ejb.jar">

              <dependencies>

                  <module name="org.hibernate" slot="3" />

              </dependencies>

       

              <exclusions>

                  <module name="org.hibernate" slot="main" />

              </exclusions>

          </sub-deployment>

      </jboss-deployment-structure>

      ------------------------------------------------------------------------------------------------------------

      3. faces-config.xml

      <?xml version="1.0" encoding="UTF-8"?>

       

      <faces-config

          xmlns="http://java.sun.com/xml/ns/javaee"

          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"

          version="1.2">

          <application>

              <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>

              <locale-config>

                  <default-locale>en</default-locale>

                  <supported-locale>bg</supported-locale>

                  <supported-locale>de</supported-locale>

                  <supported-locale>en</supported-locale>

                  <supported-locale>fr</supported-locale>

                  <supported-locale>tr</supported-locale>

              </locale-config>

          </application>

       

      </faces-config>

      ------------------------------------------------------------------------------------------------------------

       

      Logs:

      05:09:52,507 ERROR [org.jboss.seam.jsf.SeamPhaseListener] (http-/127.0.0.1:8080-4) swallowing exception: java.lang.IllegalStateException: No active application scope

          at org.jboss.seam.core.Init.instance(Init.java:115) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:317) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:143) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:117) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:214) [jsf-impl-1.2_15-b01-redhat-3.jar:1.2_15-b01-redhat-3]

          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:96) [jsf-impl-1.2_15-b01-redhat-3.jar:1.2_15-b01-redhat-3]

          at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-1.2_15-b01-redhat-3.jar:1.2_15-b01-redhat-3]

          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266) [jsf-api-1.2_15-b01-redhat-3.jar:1.2_15-b01-redhat-3]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:530) [richfaces-impl-3.3.3.Final.jar:3.3.3.Final]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206) [richfaces-impl-3.3.3.Final.jar:3.3.3.Final]

          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) [richfaces-impl-3.3.3.Final.jar:3.3.3.Final]

          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388) [richfaces-impl-3.3.3.Final.jar:3.3.3.Final]

          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515) [richfaces-impl-3.3.3.Final.jar:3.3.3.Final]

          at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:389) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]