您好我正在调用我的ejb中另一个模块的方法,该方法是从我的mdb调用的。这适用于我的机器上的单个jvm野生蝇。但是,当在集群环境中的WebSphere 8.5上部署相同的代码时,它会给出错误。我将不胜感激任何帮助
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]