dev@glassfish.java.net

Re: Multiple exceptions in QL log due to web-beans integration

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Wed, 21 Oct 2009 10:03:42 -0700

Hi Ken,

On 10/21/09 09:53, Kenneth Saks wrote:
>
> On Oct 21, 2009, at 12:38 PM, Jan Luehe wrote:
>
>> On 10/21/09 09:34, Roger Kitain wrote:
>>> I'll take a look.
>>
>> I think it's related to my change to start using
>> InjectionManager#[create|destroy]ManagedObject
>> in the context of IT 10100.
>
> The problem is that createManagedObject is being invoked outside of an
> EE invocation context. I just added a non-null check for the current
> invocation in JCDIServiceImpl. However, if the caller of
> createManagedObject is expecting injection, that will still result in
> an error from the injection manager.

The NPE was not occurring in the context of createManagedObject, but
destroyManagedObject.
While I had made sure that createManagedObject was called within an EE
invocation context,
the same was not true for destroyManagedObject.
I just moved the invocation of destroyManagedObject to be within the EE
invocation context.

Thanks,

Jan


>
>>
>> Taking a look ...
>>
>> Jan
>>
>>>
>>> Jerome Dochez wrote:
>>>> Ken, Roger
>>>>
>>>> Running QL this morning, I am seeing tons of weld related
>>>> exceptions probably due to the current invocation being null.
>>>> can you look at it asap.
>>>>
>>>> thanks, jerome
>>>>
>>>>
>>>> [#|2009-10-21T09:24:12.054-0700|SEVERE|glassfish|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=45;_ThreadName=Thread-2;|Cannot
>>>> stop module web
>>>> java.lang.NullPointerException
>>>> at
>>>> org.glassfish.weld.services.JCDIServiceImpl.isCurrentModuleJCDIEnabled(JCDIServiceImpl.java:91)
>>>>
>>>> at
>>>> com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.destroyManagedObject(InjectionManagerImpl.java:336)
>>>>
>>>> at
>>>> com.sun.web.server.J2EEInstanceListener.handleAfterEvent(J2EEInstanceListener.java:340)
>>>>
>>>> at
>>>> com.sun.web.server.J2EEInstanceListener.instanceEvent(J2EEInstanceListener.java:116)
>>>>
>>>> at
>>>> org.apache.catalina.util.InstanceSupport.fireInstanceEvent(InstanceSupport.java:384)
>>>>
>>>> at
>>>> org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1746)
>>>>
>>>> at
>>>> org.apache.catalina.core.StandardWrapper.stop(StandardWrapper.java:2042)
>>>>
>>>> at
>>>> org.apache.catalina.core.StandardContext.stop(StandardContext.java:5444)
>>>>
>>>> at com.sun.enterprise.web.WebModule.stop(WebModule.java:530)
>>>> at
>>>> org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1057)
>>>>
>>>> at
>>>> com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2060)
>>>>
>>>> at
>>>> com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2008)
>>>>
>>>> at
>>>> com.sun.enterprise.web.WebApplication.stop(WebApplication.java:134)
>>>> at org.glassfish.internal.data.EngineRef.stop(EngineRef.java:165)
>>>> at org.glassfish.internal.data.ModuleInfo.stop(ModuleInfo.java:245)
>>>> at
>>>> org.glassfish.internal.data.ApplicationInfo.stop(ApplicationInfo.java:251)
>>>>
>>>> at
>>>> com.sun.enterprise.v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:735)
>>>>
>>>> at
>>>> com.sun.enterprise.v3.server.ApplicationLifecycle.undeploy(ApplicationLifecycle.java:766)
>>>>
>>>> at
>>>> org.glassfish.deployment.admin.UndeployCommand.execute(UndeployCommand.java:179)
>>>>
>>>> at
>>>> com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
>>>>
>>>> at
>>>> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
>>>>
>>>> at
>>>> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1159)
>>>>
>>>> at
>>>> com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
>>>>
>>>> at
>>>> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1218)
>>>>
>>>> at
>>>> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1207)
>>>>
>>>> at
>>>> com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:362)
>>>>
>>>> at
>>>> com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:201)
>>>>
>>>> at
>>>> com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
>>>>
>>>> at
>>>> com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
>>>>
>>>> at
>>>> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:241)
>>>>
>>>> at
>>>> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:789)
>>>>
>>>> at
>>>> com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:697)
>>>> at
>>>> com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:951)
>>>> at
>>>> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:166)
>>>>
>>>> at
>>>> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
>>>>
>>>> at
>>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
>>>>
>>>> at
>>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
>>>>
>>>> at
>>>> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
>>>>
>>>> at
>>>> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
>>>>
>>>> at
>>>> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
>>>>
>>>> at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
>>>> at
>>>> com.sun.grizzly.util.FixedThreadPool$BasicWorker.doWork(FixedThreadPool.java:431)
>>>>
>>>> at
>>>> com.sun.grizzly.util.FixedThreadPool$BasicWorker.run(FixedThreadPool.java:410)
>>>>
>>>> at java.lang.Thread.run(Thread.java:637)
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>