0

Hi I am calling method of another module from my ejb which get invoked from my mdb. This works on my machine on single jvm on wildfly. However when same code is deployed on WebSphere 8.5 on cluster environment it gives me error. I would appreciate any help

javax.enterprise.context.ContextNotActiveException: WebBeans context with scope type annotation @Singleton does not exist within current thread
    at org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:360) ~[org.apache.webbeans.jar:na]
    at org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:950) ~[org.apache.webbeans.jar:na]
    at org.apache.webbeans.container.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:838) ~[org.apache.webbeans.jar:na]
    at org.apache.webbeans.inject.AbstractInjectable.inject(AbstractInjectable.java:138) ~[org.apache.webbeans.jar:na]
    at org.apache.webbeans.inject.InjectableField.doInjection(InjectableField.java:60) ~[org.apache.webbeans.jar:na]
    at org.apache.webbeans.component.AbstractInjectionTargetBean.injectField(AbstractInjectionTargetBean.java:366) ~[org.apache.webbeans.jar:na]
    at org.apache.webbeans.component.AbstractInjectionTargetBean.injectFields(AbstractInjectionTargetBean.java:324) ~[org.apache.webbeans.jar:na]
    at org.apache.webbeans.component.AbstractInjectionTargetBean.createDefaultInstance(AbstractInjectionTargetBean.java:150) ~[org.apache.webbeans.jar:na]
    at org.apache.webbeans.component.AbstractInjectionTargetBean.createInstance(AbstractInjectionTargetBean.java:117) ~[org.apache.webbeans.jar:na]
    at org.apache.webbeans.component.AbstractOwbBean.createNewInstance(AbstractOwbBean.java:217) ~[org.apache.webbeans.jar:na]
    at org.apache.webbeans.portable.creation.AbstractProducer.produce(AbstractProducer.java:82) ~[org.apache.webbeans.jar:na]
    at org.apache.webbeans.component.InjectionTargetWrapper.produce(InjectionTargetWrapper.java:145) ~[org.apache.webbeans.jar:na]
    at org.apache.webbeans.component.AbstractOwbBean.create(AbstractOwbBean.java:175) ~[org.apache.webbeans.jar:na]
    at org.apache.webbeans.context.DependentContext.getInstance(DependentContext.java:69) ~[org.apache.webbeans.jar:na]
    at org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:187) ~[org.apache.webbeans.jar:na]
    at org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:961) ~[org.apache.webbeans.jar:na]
    at org.apache.webbeans.container.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:831) ~[org.apache.webbeans.jar:na]
MWiesner
  • 8,868
  • 11
  • 36
  • 70
AKASHPAL
  • 11
  • 5
  • 1
    javax.inject.Singleton or javax.ejb.Singleton? Seems like neither one is a CDI scope, you will probably need to distill this to a small example you can share. – covener Nov 17 '17 at 14:32
  • Thanks Gord for the prompt reply we use javax.ejb.Singleton every where . Actually we call a facade which inject all the service in the application and these services are are indifferent scopes. – AKASHPAL Nov 20 '17 at 14:49

0 Answers0