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

          Activity

          Hide
          oranheim Ove Ranheim added a comment -

          The exception in the issue description is slightly misleading, due to some local testing.

          maschmid and I suspect the following:

          1. OAuthServiceBase at line 185 makes a call to getSession().isConnected();

          2. OAuthGenericManager at line 61 produces a SessionScoped instance of OAuthSession

          Here is an exception listing that also provides a stack-trace into seam-social.

          21:16:24,321 ERROR [com.parts.social.twitter.service.TwitterServiceBean] (SimpleThreadPoolWorker-1) org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.SessionScoped
          21:16:24,322 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:124) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
          	at org.jboss.weld.proxies.OAuthSession$Serializable$-1300747162$Proxy$_$$_WeldClientProxy.isConnected(OAuthSession$Serializable$-1300747162$Proxy$_$$_WeldClientProxy.java) [weld-core-1.1.2.Final.jar:]
          	at org.jboss.seam.social.oauth.OAuthServiceBase.isConnected(OAuthServiceBase.java:185) [seam-social-3.1.0.Final.jar:]
          	at org.jboss.seam.social.twitter.jackson.TwitterServiceJackson$Proxy$_$$_WeldClientProxy.isConnected(TwitterServiceJackson$Proxy$_$$_WeldClientProxy.java) [seam-social-twitter-3.1.0.Final.jar:]
          	at com.parts.social.twitter.service.TwitterServiceBean.connect(TwitterServiceBean.java:80) [parts-social-1.0-SNAPSHOT.jar:]
          	at com.parts.social.twitter.service.TwitterServiceBean.loadTweets(TwitterServiceBean.java:130) [parts-social-1.0-SNAPSHOT.jar:]
          	at com.parts.social.twitter.service.TwitterServiceBean.fireTweetEvent(TwitterServiceBean.java:119) [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:]
           
          21:16:24,333 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:124) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
          	at org.jboss.weld.proxies.OAuthSession$Serializable$-1300747162$Proxy$_$$_WeldClientProxy.isConnected(OAuthSession$Serializable$-1300747162$Proxy$_$$_WeldClientProxy.java) [weld-core-1.1.2.Final.jar:]
          	at org.jboss.seam.social.oauth.OAuthServiceBase.isConnected(OAuthServiceBase.java:185) [seam-social-3.1.0.Final.jar:]
          	at org.jboss.seam.social.twitter.jackson.TwitterServiceJackson$Proxy$_$$_WeldClientProxy.isConnected(TwitterServiceJackson$Proxy$_$$_WeldClientProxy.java) [seam-social-twitter-3.1.0.Final.jar:]
          	at com.parts.social.twitter.service.TwitterServiceBean.connect(TwitterServiceBean.java:80) [parts-social-1.0-SNAPSHOT.jar:]
          	at com.parts.social.twitter.service.TwitterServiceBean.loadTweets(TwitterServiceBean.java:130) [parts-social-1.0-SNAPSHOT.jar:]
          	at com.parts.social.twitter.service.TwitterServiceBean.fireTweetEvent(TwitterServiceBean.java:119) [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
          

          Show
          oranheim Ove Ranheim added a comment - The exception in the issue description is slightly misleading, due to some local testing. maschmid and I suspect the following: 1. OAuthServiceBase at line 185 makes a call to getSession().isConnected(); 2. OAuthGenericManager at line 61 produces a SessionScoped instance of OAuthSession Here is an exception listing that also provides a stack-trace into seam-social. 21:16:24,321 ERROR [com.parts.social.twitter.service.TwitterServiceBean] (SimpleThreadPoolWorker-1) org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.SessionScoped 21:16:24,322 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:124) [weld-core-1.1.2.Final.jar:2011-07-26 15:02] at org.jboss.weld.proxies.OAuthSession$Serializable$-1300747162$Proxy$_$$_WeldClientProxy.isConnected(OAuthSession$Serializable$-1300747162$Proxy$_$$_WeldClientProxy.java) [weld-core-1.1.2.Final.jar:] at org.jboss.seam.social.oauth.OAuthServiceBase.isConnected(OAuthServiceBase.java:185) [seam-social-3.1.0.Final.jar:] at org.jboss.seam.social.twitter.jackson.TwitterServiceJackson$Proxy$_$$_WeldClientProxy.isConnected(TwitterServiceJackson$Proxy$_$$_WeldClientProxy.java) [seam-social-twitter-3.1.0.Final.jar:] at com.parts.social.twitter.service.TwitterServiceBean.connect(TwitterServiceBean.java:80) [parts-social-1.0-SNAPSHOT.jar:] at com.parts.social.twitter.service.TwitterServiceBean.loadTweets(TwitterServiceBean.java:130) [parts-social-1.0-SNAPSHOT.jar:] at com.parts.social.twitter.service.TwitterServiceBean.fireTweetEvent(TwitterServiceBean.java:119) [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:]   21:16:24,333 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:124) [weld-core-1.1.2.Final.jar:2011-07-26 15:02] at org.jboss.weld.proxies.OAuthSession$Serializable$-1300747162$Proxy$_$$_WeldClientProxy.isConnected(OAuthSession$Serializable$-1300747162$Proxy$_$$_WeldClientProxy.java) [weld-core-1.1.2.Final.jar:] at org.jboss.seam.social.oauth.OAuthServiceBase.isConnected(OAuthServiceBase.java:185) [seam-social-3.1.0.Final.jar:] at org.jboss.seam.social.twitter.jackson.TwitterServiceJackson$Proxy$_$$_WeldClientProxy.isConnected(TwitterServiceJackson$Proxy$_$$_WeldClientProxy.java) [seam-social-twitter-3.1.0.Final.jar:] at com.parts.social.twitter.service.TwitterServiceBean.connect(TwitterServiceBean.java:80) [parts-social-1.0-SNAPSHOT.jar:] at com.parts.social.twitter.service.TwitterServiceBean.loadTweets(TwitterServiceBean.java:130) [parts-social-1.0-SNAPSHOT.jar:] at com.parts.social.twitter.service.TwitterServiceBean.fireTweetEvent(TwitterServiceBean.java:119) [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
          Hide
          oranheim Ove Ranheim added a comment - - edited

          Thanks to Marek(maschmid) for finding a workaround for non-interoperable seam-social 3.1.0.Final in use with seam-cron.

          This will not fix the issue of non-supported SessionScoped beans in Cron, but it fixes the use of seam-social in conjunction with seam-cron.

          Patch OAuthGenericManager at line 60 and make method public:

          protected OAuthSession produceSession()
          

          Add this seam config to beans.xml:

          <o:OAuthGenericManager>
              <s:modifies/>
              <o:produceSession>
                      <s:Produces/>
                      <s:ApplicationScoped/>
              </o:produceSession>
          </o:OAuthGenericManager>
          

          If this issue isn't resolved and seam-social provides a public produceSession() method in a maintenance release, this workaround is sufficient to make seam-social work with seam-cron. Till then, you need to patch seam-social/impl yourself.

          Show
          oranheim Ove Ranheim added a comment - - edited Thanks to Marek(maschmid) for finding a workaround for non-interoperable seam-social 3.1.0.Final in use with seam-cron. This will not fix the issue of non-supported SessionScoped beans in Cron, but it fixes the use of seam-social in conjunction with seam-cron. Patch OAuthGenericManager at line 60 and make method public: protected OAuthSession produceSession() Add this seam config to beans.xml: <o:OAuthGenericManager> <s:modifies/> <o:produceSession> <s:Produces/> <s:ApplicationScoped/> </o:produceSession> </o:OAuthGenericManager> If this issue isn't resolved and seam-social provides a public produceSession() method in a maintenance release, this workaround is sufficient to make seam-social work with seam-cron. Till then, you need to patch seam-social/impl yourself.
          Hide
          antoinesabot-durand Antoine Sabot-Durand added a comment -

          I changed the producer to make it public in Seam Social.
          I'm thinking about another solution to deal with asynchronous call like Google Guava ListenableFuture or sibling class in Guava.

          Show
          antoinesabot-durand Antoine Sabot-Durand added a comment - I changed the producer to make it public in Seam Social. I'm thinking about another solution to deal with asynchronous call like Google Guava ListenableFuture or sibling class in Guava.

            People

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

              Dates

              • Created:
                Updated:

                Development