Hey Mark,
Our real project had a EJB project as well. I stripped down the problem to a
single WAR inside an EAR. I used your was_bugs-project on github and created a
sample to demonstrate the bug. A PMR has been opened: IllegalStateException
when accessing BeanManager in JSF SystemEventListener for
PreDestroyApplicationEvent
was_bug11.ear
was_bug11.war
WEB-INF
lib
deltaspike-core-api-1.1.1-SNAPSHOT.jar
deltaspike-core-impl-1.1.1-SNAPSHOT.jar
deltaspike-jsf-module-api-1.1.1-SNAPSHOT.jar
deltaspike-jsf-module-impl-1.1.1-SNAPSHOT.jar
deltaspike-security-module-api-1.1.1-SNAPSHOT.jar
deltaspike-security-module-impl-1.1.1-SNAPSHOT.jar
Apparently, Deltaspike is unable to determine the BeanManager when it tries to
transport the JSF PreDestroyApplicationEvent. Even a JNDI lookup fails. Thus it
seems, the CDI system has already been shut down at this time. Let's see what
IBM has to say about this :-P
Regards,
Heiko
-----Ursprüngliche Nachricht-----
Von: Mark Struberg [mailto:[email protected]]
Gesendet: Montag, 10. November 2014 17:05
An: [email protected]
Betreff: Re: WebSphere: Error in deltaspike-jsf-module while stopping
application under WAS 8.0.0.9
Heiko, how does your deployable look like? Is this an EAR with multiple WARs in
there?
LieGrue,
strub
> On Monday, 10 November 2014, 10:27, Gerhard Petracek
> <[email protected]> wrote:
> > hi heiko,
>
> it sounds like an issue in WAS. there is nothing we can do about that,
> however, since JsfSystemEventBroadcaster implements Deactivatable, you
> can deactivate [1] that part yourself.
>
> regards,
> gerhard
>
> [1]
> http://deltaspike.apache.org/documentation/core.html#_deactivatable
>
>
>
>
> 2014-11-10 10:06 GMT+01:00 <[email protected]>:
>
>> Hello,
>>
>> I've come across an issue when stopping an application that uses the
>> deltaspike-jsf-module (ee6) (current SNAPSHOT of 1.1-Release). The
>> JsfSystemEventBroadcaster tries to retrieve the BeanManager and can't
> do
>> so, as an IllegalStateException is thrown.
>>
>> Can you elaborate whether you know about this and if this is
>> probably an error in the WAS CDI implementation? If so, I would
>> gladly open a PMR with IBM to get this fixed.
>>
>> The exception that occurs is:
>>
>> com.ibm.ws.webcontainer.webapp.WebApp notifyServletContextDestroyed
>> SRVE0285E: Exception caught while destroying context: {0}
>> java.lang.IllegalStateException:
>> Unable to find BeanManager. Please ensure that you configured the
>> CDI implementation of your choice properly.
>> at
>>
> org.apache.deltaspike.core.api.provider.BeanManagerProvider.getBeanMan
> ager(BeanManagerProvider.java:201)
>> at
>>
> org.apache.deltaspike.jsf.impl.listener.system.JsfSystemEventBroadcast
> er.processEvent(JsfSystemEventBroadcaster.java:55)
>> at
>> javax.faces.event.SystemEvent.processListener(SystemEvent.java:43)
>> at
>>
> org.apache.myfaces.application.ApplicationImpl._traverseListenerList(A
> pplicationImpl.java:2134)
>> at
>>
> org.apache.myfaces.application.ApplicationImpl.access$000(ApplicationI
> mpl.java:121)
>> at
>>
> org.apache.myfaces.application.ApplicationImpl$SystemListenerEntry.pub
> lish(ApplicationImpl.java:2321)
>> at
>>
> org.apache.myfaces.application.ApplicationImpl.publishEvent(Applicatio
> nImpl.java:566)
>> at
>>
> org.apache.webbeans.jsf.OwbApplication.publishEvent(OwbApplication.jav
> a:474)
>> at
>>
> org.apache.myfaces.webapp.AbstractFacesInitializer._dispatchApplicatio
> nEvent(AbstractFacesInitializer.java:262)
>> at
>>
> org.apache.myfaces.webapp.AbstractFacesInitializer.destroyFaces(Abstra
> ctFacesInitializer.java:293)
>> at
>>
> org.apache.myfaces.webapp.StartupServletContextListener.contextDestroy
> ed(StartupServletContextListener.java:153)
>> at
>>
> com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextDestroyed(We
> bApp.java:1748)
>> at com.ibm.ws.webcontainer.webapp.WebApp.destroy(WebApp.java:3036)
>> at
>> com.ibm.ws.webcontainer.webapp.WebAppImpl.destroy(WebAppImpl.java:1287)
>> at
>> com.ibm.ws.container.AbstractContainer.destroy(AbstractContainer.java:75)
>> at
>> com.ibm.ws.webcontainer.webapp.WebGroup.destroy(WebGroup.java:228)
>> at
>>
> com.ibm.ws.webcontainer.webapp.WebGroup.removeWebApplication(WebGroup.
> java:269)
>> at
>>
> com.ibm.ws.webcontainer.VirtualHost.removeWebApplication(VirtualHost.j
> ava:297)
>> at
>>
> com.ibm.ws.webcontainer.VirtualHostImpl.removeWebApplication(VirtualHo
> stImpl.java:211)
>> at
>>
> com.ibm.ws.webcontainer.WSWebContainer.removeWebApplication(WSWebConta
> iner.java:820)
>> at
>>
> com.ibm.ws.webcontainer.component.WebContainerImpl.uninstall(WebContai
> nerImpl.java:454)
>> at
>>
> com.ibm.ws.webcontainer.component.WebContainerImpl.stop(WebContainerIm
> pl.java:725)
>> at
>>
> com.ibm.ws.runtime.component.ApplicationMgrImpl.stop(ApplicationMgrImp
> l.java:1201)
>> at
>>
> com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjec
> tStop(DeployedApplicationImpl.java:1374)
>> at
>>
> com.ibm.ws.runtime.component.DeployedModuleImpl.stop(DeployedModuleImp
> l.java:671)
>> at
>>
> com.ibm.ws.runtime.component.DeployedApplicationImpl.stop(DeployedAppl
> icationImpl.java:1148)
>> at
>>
> com.ibm.ws.runtime.component.ApplicationMgrImpl.stopApplication(Applic
> ationMgrImpl.java:952)
>> at
>>
> com.ibm.ws.runtime.component.ApplicationMgrImpl.stopApplicationImpl(Ap
> plicationMgrImpl.java:1471)
>> at
>>
> com.ibm.ws.runtime.component.ApplicationMgrImpl.stop(ApplicationMgrImp
> l.java:2223)
>> at
>>
> com.ibm.ws.runtime.component.CompositionUnitMgrImpl.stop(CompositionUn
> itMgrImpl.java:446)
>> at
>>
> com.ibm.ws.runtime.component.CompositionUnitImpl.stop(CompositionUnitI
> mpl.java:141)
>> at
>>
> com.ibm.ws.runtime.component.CompositionUnitMgrImpl$2.run(CompositionU
> nitMgrImpl.java:749)
>> at
>>
> com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.j
> ava:5468)
>> at
>>
> com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManager
> Impl.java:5594)
>> at
>>
> com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.j
> ava:255)
>> at
>>
> com.ibm.ws.runtime.component.CompositionUnitMgrImpl.stopCompositionUni
> t(CompositionUnitMgrImpl.java:784)
>> at
>>
> com.ibm.ws.runtime.component.CompositionUnitMgrImpl.stopCompositionUni
> t(CompositionUnitMgrImpl.java:690)
>> at
>>
> com.ibm.ws.runtime.component.ApplicationMgrImpl.stopApplication(Applic
> ationMgrImpl.java:1448)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> ava:60)
>> at
>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> orImpl.java:37)
>> at java.lang.reflect.Method.invoke(Method.java:611)
>> at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:69)
>> at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
>> at
>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> orImpl.java:37)
>> at java.lang.reflect.Method.invoke(Method.java:611)
>> at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:272)
>> at
>>
> javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBea
> n.java:1152)
>> at
>> java.security.AccessController.doPrivileged(AccessController.java:298)
>> at
>>
> com.ibm.oti.security.CheckedAccessControlContext.securityCheck(Checked
> AccessControlContext.java:30)
>> at
>>
> sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurit
> yAccessWrapper.java:41)
>> at
>>
> javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredMo
> delMBean.java:1146)
>> at
>>
> javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBe
> an.java:999)
>> at
>>
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMB
> eanServerInterceptor.java:847)
>> at
>> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:783)
>> at
>> com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335)
>> at
>>
> com.ibm.ws.security.util.AccessController.doPrivileged(AccessControlle
> r.java:118)
>> at
>> com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
>> at
>>
> com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServ
> iceDelegator.java:181)
>> at
>> com.ibm.ws.management.connector.ipc.CallRouter.route(CallRouter.java:247)
>> at
>>
> com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink.doWork(IPC
> ConnectorInboundLink.java:360)
>> at
>>
> com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink$IPCConnect
> orReadCallback.complete(IPCConnectorInboundLink.java:602)
>> at
>>
> com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCall
> back.complete(SSLReadServiceContext.java:1818)
>> at
>>
> com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(
> AioReadCompletionListener.java:175)
>> at
>>
> com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFutur
> e.java:217)
>> at
>>
> com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannel
> Future.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.ja
> va:775)
>> at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
>> at
>> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1702)
>>
>> Best regards,
>>
>> Heiko
>>
>>
>> If you are not the addressee, please inform us immediately that you
>> have received this e-mail by mistake, and delete it. We thank you
>> for your support.
>>
>>
>
If you are not the addressee, please inform us immediately that you have
received this e-mail by mistake, and delete it. We thank you for your support.