Cluster Impl Module loaded from different module loader
bsudhananthan Apr 9, 2014 2:06 AMHi,
I'm using jboss EAP 6.1.0.
In Cluster Singleton service GroupMembershipListener listener has been added as below,
ServiceController<String> controller = singletonService.build(CurrentServiceContainer.getServiceContainer()) .addDependency(ServiceName.JBOSS.append("cluster", "singleton"), GroupMembershipNotifier.class, myHAsingletonService.getEnvInjector()).install();
Inside the overided membershipChanged method of my SingletonService I've used class belongs to module org.picketbox module. Due to which following exception occurs
2014-04-09 11:22:38,568 ERROR [xxx.xxx.xxx.cluster.singleton.service.HASingleton] Error in cluster topology monitor due to null: java.security.PrivilegedActionException: java.lang.ClassNotFoundException: org.jboss.security.client.JBossSecurityClient from [Module "org.jboss.as.clustering.impl:main" from local module loader @2f8d6a91 (finder: local module finder @6d4f6dfa (roots: /home/sudhananthan/works/Work_Base/../modules,/home/sudhananthan/works/Work_Base/../modules/system/layers/base))]
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.security.client.SecurityClientFactory.getSC(SecurityClientFactory.java:85)
at org.jboss.security.client.SecurityClientFactory.getSecurityClient(SecurityClientFactory.java:52)
at xxx.xxx.xxx.util.InternalServerLogin.login(InternalServerLogin.java:42)
at xxx.xxx.xxx.util.InternalLoginHandler.login(InternalLoginHandler.java:45)
at xxx.xxx.xxx.cluster.singleton.service.HASingleton.membershipChanged(HASingleton.java:145)
at org.jboss.as.clustering.impl.CoreGroupCommunicationService.notifyListeners(CoreGroupCommunicationService.java:1062)
at org.jboss.as.clustering.impl.CoreGroupCommunicationService$ViewChangeEventProcessor.processEvent(CoreGroupCommunicationService.java:1282)
at org.jboss.as.clustering.impl.AsynchEventHandler.run(AsynchEventHandler.java:96)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: org.jboss.security.client.JBossSecurityClient from [Module "org.jboss.as.clustering.impl:main" from local module loader @2f8d6a91 (finder: local module finder @6d4f6dfa (roots: /home/sudhananthan/works/Work_Base/../modules,/home/sudhananthan/works/Work_Base/../modules/system/layers/base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:196)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119)
at org.jboss.security.client.SecurityClientFactory$1.run(SecurityClientFactory.java:89)
... 10 more
I can resolve it by adding the dependency of org.jboss.as.clustering.impl in jboss-deployment-structure.xml and doing the same operation which i did in membershipChanged method in MDBean. Even in MDBean i get the same exception if i remove the org.jboss.as.clustering.impl dependency in jboss-deployment-structure.xml.
Anyone tell me why this occurs.
Thanks in Advance,
Sudhananthan B.