2 Replies Latest reply on Aug 19, 2014 2:26 AM by inoshikag

    Singleton not set for ModuleClassLoader




      We're using Weld and SwitchYard in our project and faced with such problem recently, app is running fine until we redeploy. After app is redeployed there is such exception:


      19:24:40,359 ERROR [com.jfx.strategy.BasicStrategyRunner] (NJ4X-5) Coordination error (NJ4X-5): java.lang.IllegalStateException: JBAS016071: Singleton not set for ModuleClassLoader for Module "deployment.metaKonnector.war:main" from Service Module Loader. This means that you are trying to access a weld deployment with a Thread Context ClassLoader that is not associated with the deployment.

        at org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:75) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

        at org.jboss.weld.Container.instance(Container.java:54) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]

        at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:67) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]

        at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:104) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]

        at org.jboss.weld.proxies.TradeOrderDAO$1366014919$Proxy$_$$_WeldClientProxy.getTraderAccountPerformance(TradeOrderDAO$1366014919$Proxy$_$$_WeldClientProxy.java) [weld-core-1.1.6.Final.jar:]


      During deployment and undeployment processes i can see such logs:


      19:53:30,103 INFO  [org.jboss.weld.deployer] (MSC service thread 1-5) JBAS016008: Starting weld service for deployment metaKonnector.war


      19:52:21,676 INFO  [org.jboss.weld.deployer] (MSC service thread 1-5) JBAS016009: Stopping weld service for deployment metaKonnector.war


      Probably i need to clean up some more resources manually or create some class after redeployment? Can you help me to solve this issue?


      The platform app is running is JBoss AS 7.1 with weld-core-1.1.6.Final.


      Thanks, Anton