Uploaded image for project: 'Seam Cron'
  1. Seam Cron
  2. SEAMCRON-43

WELD-001303 No active contexts for scope type javax.enterprise.context.SessionScoped

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0.Alpha1
    • Fix Version/s: 3.0.0.Alpha2
    • Component/s: Compliance
    • Labels:
      None
    • Steps to Reproduce:
      Hide

          public void fireTweetEvent(@Observes @Every(value = Interval.MINUTE) Trigger t) { 
              loadTweets();
          }
          
          @Asynchronous
          public void loadTweets() {
              sessionScopedBeanInstance.get();
          }
      

      The call to sessionScopedBeanInstance.get() will cause org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.SessionScoped

      Show
      public void fireTweetEvent(@Observes @Every(value = Interval.MINUTE) Trigger t) { loadTweets(); } @Asynchronous public void loadTweets() { sessionScopedBeanInstance.get(); } The call to sessionScopedBeanInstance.get() will cause org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.SessionScoped
    • Affects:
      Compatibility/Configuration

      Description

      It's not possible to invoke a Bean that is either SessionScoped or contains a reference to a SessionScoped bean using seam-cron-asynchronous-quartz 3.0-SNAPSHOT (2012-01-09).

      This causes failure when trying to fetch a Twitter Feed using Seam Social 3.1.0.Final.

      20:44:12,920 INFO  [com.parts.social.twitter.service.TwitterListener] (SimpleThreadPoolWorker-1) Before session scope invocation
      20:44:12,924 ERROR [org.quartz.core.JobRunShell] (SimpleThreadPoolWorker-1) Job DEFAULT.org.jboss.seam.cron.spi.scheduling.trigger.IntervalTriggerDetail{, qualifier=@org.jboss.seam.cron.api.scheduling.Every(nth=1, value=MINUTE), repeatUnit=MINUTE, repeatInterval=1}-trigger threw an unhandled Exception: : org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.SessionScoped
      	at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:667) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:77) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at com.parts.social.twitter.service.SessionBean$Proxy$_$$_WeldClientProxy.sayHello(SessionBean$Proxy$_$$_WeldClientProxy.java) [parts-social-1.0-SNAPSHOT.jar:]
      	at com.parts.social.twitter.service.TwitterListener.observeFetchTwitter(TwitterListener.java:27) [parts-social-1.0-SNAPSHOT.jar:]
      	at com.parts.social.twitter.service.TwitterListener$Proxy$_$$_WeldClientProxy.observeFetchTwitter(TwitterListener$Proxy$_$$_WeldClientProxy.java) [parts-social-1.0-SNAPSHOT.jar:]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
      	at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
      	at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:628) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.event.EventImpl.fire(EventImpl.java:75) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at com.parts.social.twitter.service.TwitterServiceBean.loadTweets(TwitterServiceBean.java:128) [parts-social-1.0-SNAPSHOT.jar:]
      	at com.parts.social.twitter.service.TwitterServiceBean.fireTweetEvent(TwitterServiceBean.java:120) [parts-social-1.0-SNAPSHOT.jar:]
      	at com.parts.social.twitter.service.TwitterServiceBean$Proxy$_$$_WeldClientProxy.fireTweetEvent(TwitterServiceBean$Proxy$_$$_WeldClientProxy.java) [parts-social-1.0-SNAPSHOT.jar:]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
      	at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
      	at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:622) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:616) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.seam.cron.spi.scheduling.trigger.TriggerSupport.fireTrigger(TriggerSupport.java:96) [seam-cron-spi-3.1.0.B4.jar:]
      	at org.jboss.seam.cron.spi.scheduling.trigger.ProviderContextTriggerSupport.fireTrigger(ProviderContextTriggerSupport.java:61) [seam-cron-spi-3.1.0.B4.jar:]
      	at org.jboss.seam.cron.scheduling.quartz.TriggerJob.execute(TriggerJob.java:49) [seam-cron-scheduling-quartz-3.1.0.B4.jar:]
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-1.6.1.jar:]
      	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) [quartz-1.6.1.jar:]
       
      20:44:12,930 ERROR [org.quartz.core.ErrorLogger] (SimpleThreadPoolWorker-1) Job (DEFAULT.org.jboss.seam.cron.spi.scheduling.trigger.IntervalTriggerDetail{, qualifier=@org.jboss.seam.cron.api.scheduling.Every(nth=1, value=MINUTE), repeatUnit=MINUTE, repeatInterval=1}-trigger threw an exception.: org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.SessionScoped]
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:213) [quartz-1.6.1.jar:]
      	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) [quartz-1.6.1.jar:]
      Caused by: org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.SessionScoped
      	at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:667) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:77) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at com.parts.social.twitter.service.SessionBean$Proxy$_$$_WeldClientProxy.sayHello(SessionBean$Proxy$_$$_WeldClientProxy.java) [parts-social-1.0-SNAPSHOT.jar:]
      	at com.parts.social.twitter.service.TwitterListener.observeFetchTwitter(TwitterListener.java:27) [parts-social-1.0-SNAPSHOT.jar:]
      	at com.parts.social.twitter.service.TwitterListener$Proxy$_$$_WeldClientProxy.observeFetchTwitter(TwitterListener$Proxy$_$$_WeldClientProxy.java) [parts-social-1.0-SNAPSHOT.jar:]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
      	at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
      	at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:628) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.event.EventImpl.fire(EventImpl.java:75) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at com.parts.social.twitter.service.TwitterServiceBean.loadTweets(TwitterServiceBean.java:128) [parts-social-1.0-SNAPSHOT.jar:]
      	at com.parts.social.twitter.service.TwitterServiceBean.fireTweetEvent(TwitterServiceBean.java:120) [parts-social-1.0-SNAPSHOT.jar:]
      	at com.parts.social.twitter.service.TwitterServiceBean$Proxy$_$$_WeldClientProxy.fireTweetEvent(TwitterServiceBean$Proxy$_$$_WeldClientProxy.java) [parts-social-1.0-SNAPSHOT.jar:]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]
      	at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]
      	at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:622) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:616) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
      	at org.jboss.seam.cron.spi.scheduling.trigger.TriggerSupport.fireTrigger(TriggerSupport.java:96) [seam-cron-spi-3.1.0.B4.jar:]
      	at org.jboss.seam.cron.spi.scheduling.trigger.ProviderContextTriggerSupport.fireTrigger(ProviderContextTriggerSupport.java:61) [seam-cron-spi-3.1.0.B4.jar:]
      	at org.jboss.seam.cron.scheduling.quartz.TriggerJob.execute(TriggerJob.java:49) [seam-cron-scheduling-quartz-3.1.0.B4.jar:]
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-1.6.1.jar:]
      	... 1 more
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                peteroyle Peter Royle
                Reporter:
                oranheim Ove Ranheim
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: