0 Replies Latest reply on Feb 21, 2009 8:17 AM by Jubril Adisa

    Making a Spring bean into a Seam Component

    Jubril Adisa Novice

      My Spring bean works fine i can inject it into my application, But i encounter this exception
      when converting it to a seam component

      No active application scope


      this is my bean
      <bean id="timerService" class="com.brefftjobs.utilities.timer.TimerServiceImpl" scope="prototype">
           <seam:component/>
      </bean>


      and this is the stack trace


      2:07:41,093 ERROR [ContextLoader] Context initialization failed
      org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/beans/service.xml]; nested exception is java.lang.IllegalStateException: No active application scope
           at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
           at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
           at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
           at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
           at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
           at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
           at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
           at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
           at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
           at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)
           at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
           at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
           at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
           at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
           at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
           at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
           at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
           at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
           at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
           at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      nd check the preview.