1 Reply Latest reply on Jun 4, 2010 4:37 AM by gaurav bagga

    Weld and JPA running in Tomcat (Scope Error)

    gaurav bagga Newbie

      I tried the example above without using maven


      my libraries are


      antlr-2.7.6.jar cdi-api.jar com.springsource.javax.servlet.jsp.jstl-1.2.0.jar com.springsource.org.hsqldb-1.8.0.9.jar commons-beanutils-1.7.0.jar commons-codec-1.3.jar commons-collections-3.1.jar commons-digester-1.8.jar commons-discovery-0.4.jar commons-logging-1.1.1.jar dom4j-1.6.1.jar hibernate-jpa-2.0-api-1.0.0.Final.jar hibernate3.jar javassist-3.9.0.GA.jar jsf-api.jar jsf-impl.jar jta-1.1.jar slf4j-api-1.5.8.jar weld-api.jar weld-core.jar weld-servlet-int.jar weld-servlet.jar weld-spi.jar weld-tomcat-support.jar


      when i access the page http://localhost:8080/weldTest/index.jsf


      i get the following error




      org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type @ConversationScoped
           at org.jboss.weld.conversation.ConversationImpl.checkConversationActive(ConversationImpl.java:79)
           at org.jboss.weld.conversation.ConversationImpl.isTransient(ConversationImpl.java:234)
           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:597)
           at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:304)
           at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
           at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
           at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:298)
           at org.jboss.weld.bean.proxy.ClientProxyMethodHandler.invoke(ClientProxyMethodHandler.java:113)
           at org.jboss.weld.util.CleanableMethodHandler.invoke(CleanableMethodHandler.java:43)
           at org.jboss.weld.conversation.ConversationImpl_$$_javassist_2.isTransient(ConversationImpl_$$_javassist_2.java)
           at org.jboss.weld.conversation.AbstractConversationManager.cleanupConversation(AbstractConversationManager.java:148)
           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:597)
           at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:304)
           at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
           at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
           at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:298)
           at org.jboss.weld.bean.proxy.ClientProxyMethodHandler.invoke(ClientProxyMethodHandler.java:113)
           at org.jboss.weld.util.CleanableMethodHandler.invoke(CleanableMethodHandler.java:43)
           at org.jboss.weld.conversation.ServletConversationManager_$$_javassist_0.cleanupConversation(ServletConversationManager_$$_javassist_0.java)
           at org.jboss.weld.jsf.WeldPhaseListener.afterRenderResponse(WeldPhaseListener.java:131)
           at org.jboss.weld.jsf.WeldPhaseListener.afterPhase(WeldPhaseListener.java:103)
           at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:189)
           at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:107)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
           at java.lang.Thread.run(Thread.java:619)




      any clues what is happening ....?


      I'll really appreciate if some one can help me with this.....