WELD-001303的范围类型没有激活的上下文javax.enterprise.context.SessionScoped [英] WELD-001303 No active contexts for scope type javax.enterprise.context.SessionScoped

查看:1644
本文介绍了WELD-001303的范围类型没有激活的上下文javax.enterprise.context.SessionScoped的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已搜查每一个地方,但我似乎无法找出我最好的答案,解决了这个错误,也就是我的堆栈跟踪,可有人告诉我,我有什么发生,我花了三三两两约会寻找这个错误。 ...:(

  16:55:02405严重[org.activiti.engine.impl.jobexecutor.TimerCatchIntermediateEventJobHandler(螺纹-16(HornetQ的客户端全局线程-982087879))定时器期间例外执行:org.activiti.engine.ActivitiException:异常在调用TaskListener:WELD-001303的范围类型javax.enterprise.context.SessionScoped没有有效的上下文
    在org.activiti.engine.impl.persistence.entity.TaskEntity.fireEvent(TaskEntity.java:529)的Activiti引擎-5.11.jar:5.11]
    在 ....
org.jboss.weld.context.ContextNotActiveException:引起WELD-001303的范围类型没有激活的上下文javax.enterprise.context.SessionScoped
    在org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:598)焊接核心1.1.5.AS71.Final.jar:2012-02-10 15:31]
    在org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:71)焊接核心1.1.5.AS71.Final.jar:2012-02-10 15:31]
    在org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79)焊接核心1.1.5.AS71.Final.jar:2012-02-10 15:31]
    在com.metro.wfm.shared.cdi.OverrideUserBean$Proxy$_$$_WeldClientProxy.hasBean(OverrideUserBean$Proxy$_$$_WeldClientProxy.java) [WFM共享-0.0.2.jar:]
    ... 168更多


解决方案

会话范围上下文是在服务器小程序与只调用主动服务()方法,或执行时Servlet过滤器。不知道你有你的Activiti作业设置,但它似乎不是一个会话上下文的活跃期之内。因此,如果你注入需要 @SessionScoped 然后注入将失败的任何豆。

解决办法是去除豆注射要求 @SessionScoped ,或修改豆类。

I have searched every where, but seem I cannot find out the best answer for me to resolved this error, there is my stack trace, can somebody tell me what happening with me, I have spent twos date to finding this error....:(

16:55:02,405 SEVERE [org.activiti.engine.impl.jobexecutor.TimerCatchIntermediateEventJobHandler] (Thread-16 (HornetQ-client-global-threads-982087879)) exception during timer execution: org.activiti.engine.ActivitiException: Exception while invoking TaskListener: WELD-001303 No active contexts for scope type javax.enterprise.context.SessionScoped
    at org.activiti.engine.impl.persistence.entity.TaskEntity.fireEvent(TaskEntity.java:529) [activiti-engine-5.11.jar:5.11]
    at ....
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:598) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
    at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:71) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
    at com.metro.wfm.shared.cdi.OverrideUserBean$Proxy$_$$_WeldClientProxy.hasBean(OverrideUserBean$Proxy$_$$_WeldClientProxy.java) [wfm-shared-0.0.2.jar:]
    ... 168 more

解决方案

Session scoped contexts are only active during servlet calls with the service() method, or when executing a servlet filter. Not sure how you have your Activiti job setup, but it would appear not to be within the active period of a session context. As such, if you inject any beans that require @SessionScoped then the injection will fail.

The solution would be to remove the bean injections that require @SessionScoped, or to modify the beans.

这篇关于WELD-001303的范围类型没有激活的上下文javax.enterprise.context.SessionScoped的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆