javax.enterprise.context.ContextNotActiveException: WebBeans context with scope type annotation @Singleton does not exist within current thread

openwebbeans-user | Mike Olson | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    WebBeans context with scope type annotation @Singleton does not exist within current thread

    openwebbeans-user | 4 years ago | Mike Olson
    javax.enterprise.context.ContextNotActiveException: WebBeans context with scope type annotation @Singleton does not exist within current thread

    Root Cause Analysis

    1. javax.enterprise.context.ContextNotActiveException

      WebBeans context with scope type annotation @Singleton does not exist within current thread

      at org.apache.webbeans.container.BeanManagerImpl.getContext()
    2. OpenWebBeans Core
      AbstractInjectionTargetBean.injectFields
      1. org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:351)
      2. org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:861)
      3. org.apache.webbeans.container.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:759)
      4. org.apache.webbeans.inject.AbstractInjectable.inject(AbstractInjectable.java:136)
      5. org.apache.webbeans.inject.InjectableField.doInjection(InjectableField.java:59)
      6. org.apache.webbeans.component.AbstractInjectionTargetBean.injectField(AbstractInjectionTargetBean.java:387)
      7. org.apache.webbeans.component.AbstractInjectionTargetBean.injectFields(AbstractInjectionTargetBean.java:324)
      7 frames
    3. org.apache.webbeans
      InjectionTargetProducer.inject
      1. org.apache.webbeans.portable.creation.InjectionTargetProducer.inject(InjectionTargetProducer.java:95)
      1 frame
    4. OpenWebBeans Core
      AbstractInjectionTargetBean.injectSuperFields
      1. org.apache.webbeans.component.InjectionTargetWrapper.inject(InjectionTargetWrapper.java:76)
      2. org.apache.webbeans.component.AbstractOwbBean.create(AbstractOwbBean.java:181)
      3. org.apache.webbeans.context.DependentContext.getInstance(DependentContext.java:70)
      4. org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:132)
      5. org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:872)
      6. org.apache.webbeans.container.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:753)
      7. org.apache.webbeans.inject.AbstractInjectable.inject(AbstractInjectable.java:136)
      8. org.apache.webbeans.inject.InjectableField.doInjection(InjectableField.java:59)
      9. org.apache.webbeans.component.AbstractInjectionTargetBean.injectField(AbstractInjectionTargetBean.java:387)
      10. org.apache.webbeans.component.AbstractInjectionTargetBean.injectSuperFields(AbstractInjectionTargetBean.java:368)
      10 frames
    5. org.apache.webbeans
      InjectionTargetProducer.inject
      1. org.apache.webbeans.portable.creation.InjectionTargetProducer.inject(InjectionTargetProducer.java:93)
      1 frame
    6. OpenWebBeans Core
      InstanceImpl.get
      1. org.apache.webbeans.component.InjectionTargetWrapper.inject(InjectionTargetWrapper.java:76)
      2. org.apache.webbeans.component.AbstractOwbBean.create(AbstractOwbBean.java:181)
      3. org.apache.webbeans.context.DependentContext.getInstance(DependentContext.java:70)
      4. org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:132)
      5. org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:872)
      6. org.apache.webbeans.inject.instance.InstanceImpl.get(InstanceImpl.java:126)
      6 frames