2 Replies Latest reply: Jun 21, 2012 1:10 PM by Marcos Portela RSS

Problem on consuming Topic JMS - ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.SessionScoped

Marcos Portela Newbie

I need consume messages from jms topics and publish on the web page. Actually, I am using richfaces (4.2.2.Final) push, and seam-jms (3.1.0.Final) and CDI Events

to achieve this. Unfortunately, i´ve got a exception WELD-001303:  WELD-001303 No active contexts for scope type javax.enterprise.context.SessionScoped:

 

11:49:13,092 INFO  [org.megatech.horus.filters.listener.ReceivingComandoClientListener] (Thread-17 (HornetQ-client-global-threads-18061036)) Received comand: {"id_horus":"ID0001","cod_servico":"03","msg":"04","param":"01","hash":"be4a90ed133fad3c78121ac605023fff1422d75d"}

11:49:13,095 WARN  [org.hornetq.jms.client.JMSMessageListenerWrapper] (Thread-17 (HornetQ-client-global-threads-18061036)) Unhandled exception thrown from onMessage: 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:619) [weld-core-1.1.8.Final.jar:2012-04-29 10:45]

          at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:71) [weld-core-1.1.8.Final.jar:2012-04-29 10:45]

          at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79) [weld-core-1.1.8.Final.jar:2012-04-29 10:45]

          at org.jboss.seam.security.IdentityImpl$Proxy$_$$_WeldClientProxy.toString(IdentityImpl$Proxy$_$$_WeldClientProxy.java) [seam-security-3.1.0.Final.jar:3.1.0.Final]

          at java.util.Formatter$FormatSpecifier.printString(Formatter.java:2794) [rt.jar:1.6.0_32]

          at java.util.Formatter$FormatSpecifier.print(Formatter.java:2677) [rt.jar:1.6.0_32]

          at java.util.Formatter.format(Formatter.java:2433) [rt.jar:1.6.0_32]

          at java.util.Formatter.format(Formatter.java:2367) [rt.jar:1.6.0_32]

          at java.lang.String.format(String.java:2769) [rt.jar:1.6.0_32]

          at org.jboss.solder.reflection.Reflections.buildInvokeMethodErrorMessage(Reflections.java:344) [solder-api-3.1.0.Final.jar:3.1.0.Final]

          at org.jboss.solder.reflection.Reflections.invokeMethod(Reflections.java:480) [solder-api-3.1.0.Final.jar:3.1.0.Final]

          at org.jboss.solder.reflection.Reflections.invokeMethod(Reflections.java:403) [solder-api-3.1.0.Final.jar:3.1.0.Final]

          at org.jboss.solder.reflection.annotated.InjectableMethod.invoke(InjectableMethod.java:175) [solder-impl-3.1.0.Final.jar:3.1.0.Final]

          at org.jboss.seam.security.SecurityExtension$Authorizer.authorize(SecurityExtension.java:74) [seam-security-3.1.0.Final.jar:3.1.0.Final]

          at org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:31) [seam-security-3.1.0.Final.jar:3.1.0.Final]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_32]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_32]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_32]

          at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_32]

          at org.jboss.weld.interceptor.proxy.SimpleMethodInvocation.invoke(SimpleMethodInvocation.java:30) [weld-core-1.1.8.Final.jar:2012-04-29 10:45]

          at org.jboss.weld.interceptor.proxy.SimpleInterceptionChain.invokeNextInterceptor(SimpleInterceptionChain.java:68) [weld-core-1.1.8.Final.jar:2012-04-29 10:45]

          at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:112) [weld-core-1.1.8.Final.jar:2012-04-29 10:45]

          at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:88) [weld-core-1.1.8.Final.jar:2012-04-29 10:45]

          at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:53) [weld-core-1.1.8.Final.jar:2012-04-29 10:45]

          at org.megatech.horus.view.ComandoBean$Proxy$_$$_WeldSubclass.fireCmdEvent(ComandoBean$Proxy$_$$_WeldSubclass.java) [classes:]

          at org.megatech.horus.filters.listener.ReceivingComandoClientListener.onMessage(ReceivingComandoClientListener.java:27) [classes:]

          at org.hornetq.jms.client.JMSMessageListenerWrapper.onMessage(JMSMessageListenerWrapper.java:91)

          at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:983)

          at org.hornetq.core.client.impl.ClientConsumerImpl.access$400(ClientConsumerImpl.java:48)

          at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1113)

          at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_32]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_32]

          at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_32]

 

If more information was necessary, I will provide.

 

PS: I forgot to tell, i updated the weld (1.1.5.AS71.Final) to (1.1.8.Final) module. I using jboss as 7.1.1.Final