1 Reply Latest reply on Jun 27, 2007 11:08 AM by Danijel Jevtic

    No application context active

    Levent Aksu Newbie

      Hi,

      I have followed these migration recommendations:
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=112038
      and
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=112040

      but still get the following stacktrace upon deployment:

      WebModule[/gop-war]Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
      javax.faces.FacesException: java.lang.IllegalStateException: No application context active
       at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:502)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4236)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4760)
       at com.sun.enterprise.web.WebModule.start(WebModule.java:292)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:833)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:817)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:662)
       at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1479)
       at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1143)
       at com.sun.enterprise.web.WebContainer.loadJ2EEApplicationWebModules(WebContainer.java:1068)
       at com.sun.enterprise.server.TomcatApplicationLoader.load(TomcatApplicationLoader.java:128)
       at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:322)
       at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:196)
       at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:633)
       at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:908)
       at com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:892)
       at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:445)
       at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:160)
       at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:296)
       at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:203)
       at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:285)
       at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:119)
       at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
       at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
       at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:541)
       at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:585)
       at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:719)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      Caused by: java.lang.IllegalStateException: No application context active
       at org.jboss.seam.Component.forName(Component.java:1647)
       at org.jboss.seam.Component.getInstance(Component.java:1697)
       at org.jboss.seam.Component.getInstance(Component.java:1680)
       at org.jboss.seam.Component.getInstance(Component.java:1659)
       at org.jboss.seam.core.ResourceBundle.instance(ResourceBundle.java:194)
       at org.jboss.seam.jsf.SeamApplicationMessageBundle.handleGetObject(SeamApplicationMessageBundle.java:28)
       at java.util.ResourceBundle.getObject(ResourceBundle.java:380)
       at java.util.ResourceBundle.getString(ResourceBundle.java:346)
       at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:108)
       at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:80)
       at com.sun.faces.util.MessageUtils.getExceptionMessageString(MessageUtils.java:276)
       at com.sun.faces.util.Util.createInstance(Util.java:585)
       at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:778)
       at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:596)
       at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:496)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4236)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4760)
       at com.sun.enterprise.web.WebModule.start(WebModule.java:292)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:833)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:817)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:662)
       at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1479)
       at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1143)
       at com.sun.enterprise.web.WebContainer.loadJ2EEApplicationWebModules(WebContainer.java:1068)
       at com.sun.enterprise.server.TomcatApplicationLoader.load(TomcatApplicationLoader.java:128)
       at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:322)
       at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:196)
       at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:633)
       at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:908)
       at com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:892)
       at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:445)
       at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:160)
      Context startup failed due to previous errors


      I have the following configuration files
      web.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <web-app version="2.5" 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-app_2_5.xsd">
      
       <context-param>
       <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
       <param-value>.xhtml</param-value>
       </context-param>
      
       <context-param>
       <param-name>facelets.DEVELOPMENT</param-name>
       <param-value>true</param-value>
       </context-param>
      
       <!-- Ajax4jsf -->
       <context-param>
       <param-name>org.ajax4jsf.SKIN</param-name>
       <param-value>blueSky</param-value>
       </context-param>
      
       <context-param>
       <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
       <param-value>com.sun.facelets.FaceletViewHandler</param-value>
       </context-param>
      
       <!-- Seam Filter -->
       <filter>
       <filter-name>Seam Filter</filter-name>
       <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
       </filter>
      
       <filter-mapping>
       <filter-name>Seam Filter</filter-name>
       <url-pattern>/*</url-pattern>
       </filter-mapping>
      
       <!-- Seam Listener-->
       <listener>
       <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
       </listener>
      
       <!-- JSF RI -->
       <listener>
       <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
       </listener>
      
       <!-- Seam Resource Servlet -->
       <servlet>
       <servlet-name>Seam Resource Servlet</servlet-name>
       <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>Seam Resource Servlet</servlet-name>
       <url-pattern>/seam/resource/*</url-pattern>
       </servlet-mapping>
      
       <!-- Faces Servlet -->
       <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>*.xhtml</url-pattern>
       </servlet-mapping>
      
       <session-config>
       <session-timeout>30</session-timeout>
       </session-config>
      
       <welcome-file-list>
       <welcome-file>istekler.xhtml</welcome-file>
       </welcome-file-list>
      
       <context-param>
       <param-name>facelets.SKIP_COMMENTS</param-name>
       <param-value>true</param-value>
       </context-param>
      
       <context-param>
       <param-name>com.sun.faces.verifyObjects</param-name>
       <param-value>true</param-value>
       </context-param>
      
       <context-param>
       <param-name>com.sun.faces.validateXml</param-name>
       <param-value>true</param-value>
       </context-param>
      
       <context-param>
       <param-name>javax.faces.CONFIG_FILES</param-name>
       <param-value>/WEB-INF/navigation.xml</param-value>
       </context-param>
       <context-param>
       <param-name>org.jboss.seam.core.init.debug</param-name>
       <param-value>true</param-value>
       </context-param>
      
       <context-param>
       <param-name>facelets.REFRESH_PERIOD</param-name>
       <param-value>2</param-value>
       </context-param>
       <context-param>
       <param-name>org.ajax4jsf.SKIN</param-name>
       <param-value>DEFAULT</param-value>
       </context-param>
      
       <ejb-local-ref>
       <ejb-ref-name>gop-ejb/Otantikamator/local</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <local-home/>
       <local>datassist.gop.action.OtantikamatorLocal</local>
       <ejb-link>Otantikamator</ejb-link>
       </ejb-local-ref>
      
       <ejb-local-ref>
       <ejb-ref-name>gop-ejb/IstekForm/local</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <local-home/>
       <local>datassist.gop.action.IstekFormLocal</local>
       <ejb-link>IstekForm</ejb-link>
       </ejb-local-ref>
      
       <ejb-local-ref>
       <ejb-ref-name>gop-ejb/IsteklerAra/local</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <local-home/>
       <local>datassist.gop.action.IsteklerAraLocal</local>
       <ejb-link>IsteklerAra</ejb-link>
       </ejb-local-ref>
      
       <ejb-local-ref>
       <ejb-ref-name>gop-ejb/KullanicilarAra/local</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <local-home/>
       <local>datassist.gop.action.KullanicilarAraLocal</local>
       <ejb-link>KullanicilarAra</ejb-link>
       </ejb-local-ref>
      
       <ejb-local-ref>
       <ejb-ref-name>gop-ejb/KullaniciForm/local</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <local-home/>
       <local>datassist.gop.action.KullaniciFormLocal</local>
       <ejb-link>KullaniciForm</ejb-link>
       </ejb-local-ref>
      
      </web-app>


      faces-config:
      <?xml version='1.0' encoding='UTF-8'?>
      <faces-config version="1.2"
       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">
      
       <application>
       <view-handler>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</view-handler>
       <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
       </application>
      
      </faces-config>


      components.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:security="http://jboss.com/products/seam/security"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
       http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.1.xsd
       http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.1.xsd
       http://jboss.com/products/seam/security http://jboss.com/products/seam/security-1.1.xsd
      ">
       <core:init jndi-pattern="java:comp/env/gop-ejb/#{ejbName}/local" debug="true"/>
      
       <core:manager conversation-timeout="120000"
       concurrent-request-timeout="500"
       conversation-id-parameter="cid"
       />
      
       <core:transactionListener/>
       <!--core:ejb installed="@embeddedEjb@"/-->
       <security:identity authenticate-method="#{otantikamator.otantikmi}"/>
      
       <event type="org.jboss.seam.notLoggedIn">
       <action expression="#{redirect.captureCurrentView}"/>
       </event>
       <event type="org.jboss.seam.postAuthenticate">
       <action expression="#{redirect.returnToCapturedView}"/>
       </event>
      
       <component class="org.jboss.seam.web.MultipartFilter">
       <property name="createTempFiles">true</property>
       <property name="maxRequestSize">1000000</property>
       </component>
      
       <event type="isteklerRefresh">
       <action expression="#{isteklerAra.refresh}"/>
       </event>
      
      </components>