2 Replies Latest reply on Aug 11, 2011 9:05 AM by viniciuscarvalho.viniciusccarvalho.gmail.com

    Before shutdown problems on AS 7

    viniciuscarvalho.viniciusccarvalho.gmail.com

      Hi. I found the WELD-891 JIRA, and I believe I have the same problem. My extension adds support for a beforeshutdown event:


      void beforeShutdown(@Observes BeforeShutdown shutdown, final BeanManager beanManager) { }


      But before it even gets called, the WeldBootStrap is throwing an exception:



      13:55:54,477 ERROR [org.jboss.weld.Bootstrap] (MSC service thread 1-1) : java.lang.IllegalStateException: Singleton not set for ModuleClassLoader for Module "deployment.0900_camel-ext-ear.ear:main" from Service Module Loader
              at org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:71) [jboss-as-weld-7.0.0.Final.jar:7.0.0.Final]
              at org.jboss.weld.context.AbstractSharedContext.getBeanStore(AbstractSharedContext.java:54) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
              at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:94) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
              at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:693) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
              at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:264) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
              at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
              at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:88) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
              at org.jboss.weld.bootstrap.events.BeforeShutdownImpl.fire(BeforeShutdownImpl.java:62) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
              at org.jboss.weld.bootstrap.events.BeforeShutdownImpl.fire(BeforeShutdownImpl.java:50) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
              at org.jboss.weld.bootstrap.WeldBootstrap.shutdown(WeldBootstrap.java:499) [weld-core-1.1.2.AS7.jar:2011-07-06 12:26]
              at org.jboss.as.weld.WeldContainer.stop(WeldContainer.java:102) [jboss-as-weld-7.0.0.Final.jar:7.0.0.Final]
              at org.jboss.as.weld.services.WeldService.stop(WeldService.java:103) [jboss-as-weld-7.0.0.Final.jar:7.0.0.Final]
              at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1869)
              at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_21]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_21]
              at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]
      
      



      Anyone knows how can I fix this? It works ok on JBAS 6 Final, but for some reason there, my extension does not work as the war file gets deployed after the extension and I can't pre process the beans from the war file.


      Regards