[weld-dev] RquestScoped not active inside WeldInitialListener.requestDestroyed
Benjamin Confino
BENJAMIC at uk.ibm.com
Mon Jun 11 04:46:31 EDT 2018
Hello.
I have a customer who's getting ContextNotActiveExceptions for the
RequestScoped Context. This happens inside the invocation of
WeldInitialListener.requestDestroyed() after the customer's application
invalidated the session. DefaultLifecycleCallbackInvoker.invokeMethods
invokes a method in application code, which calls a method on a proxy,
which results in weld attempting to get the context from the BeanManager
and the ContextNotActiveException.
My question is simple. Is this an integration issue or is this an
application issue?
Here is the stack:
org.jboss.weld.context.ContextNotActiveException: WELD-001303: No active
contexts for scope type javax.enterprise.context.RequestScoped
at
org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:731)
at
org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:89)
at
org.jboss.weld.bean.ContextualInstanceStrategy$CachingContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:164)
at
org.jboss.weld.bean.ContextualInstance.getIfExists(ContextualInstance.java:63)
at
org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:83)
at
org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:125)
<CustomerClass>$$_WeldClientProxy.getUserId(Unknown Source)
<Application Code>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at
org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:97)
at
org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.preDestroy(DefaultLifecycleCallbackInvoker.java:90)
at
org.jboss.weld.injection.producer.BasicInjectionTarget.preDestroy(BasicInjectionTarget.java:127)
at org.jboss.weld.bean.ManagedBean.destroy(ManagedBean.java:191)
at
org.jboss.weld.util.bean.IsolatedForwardingBean.destroy(IsolatedForwardingBean.java:50)
at
org.jboss.weld.context.AbstractContext.destroyContextualInstance(AbstractContext.java:139)
at
org.jboss.weld.context.AbstractContext.destroy(AbstractContext.java:153)
at
org.jboss.weld.context.AbstractManagedContext.deactivate(AbstractManagedContext.java:58)
at
org.jboss.weld.context.AbstractBoundContext.deactivate(AbstractBoundContext.java:72)
at
org.jboss.weld.servlet.HttpContextLifecycle.safelyDeactivate(HttpContextLifecycle.java:378)
at
org.jboss.weld.servlet.HttpContextLifecycle.requestDestroyed(HttpContextLifecycle.java:311)
at
org.jboss.weld.servlet.WeldInitialListener.requestDestroyed(WeldInitialListener.java:135)
at
com.ibm.ws.webcontainer.managedobject.ManagedObjectListenerWrapper.requestDestroyed(ManagedObjectListenerWrapper.java:98)
at
com.ibm.ws.webcontainer.webapp.WebApp.notifyServletRequestDestroyed(WebApp.java:2042)
at
com.ibm.wsspi.webcontainer.collaborator.CollaboratorHelper.postInvokeCollaborators(CollaboratorHelper.java:532)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1282)
at
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:82)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:963)
at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:382)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:532)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:318)
at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1909)
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20180611/71f32ca0/attachment-0001.html
More information about the weld-dev
mailing list