HAServiceMBeanSupport subclasses could not get the HAPartiti
arulasha Mar 3, 2009 5:22 AMIn our application, we have created couple of Mbeans by extending the HAServiceMBeanSupport and registratered dynamically through Mbean server. This was working till last Jboss AS 5 CR2. It seems after Jboss AS 5.0.0 GA release, got the below exception while the mbean trying to send the notification.
Code from class HAServiceImpl ...
protected void callAsyncMethodOnPartition(String methodName, Object[] args, Class<?>[] types) throws Exception
{
this.partition.callAsynchMethodOnCluster(this.name, methodName, args, types, true);
}
It seems the partition object is null. Not sure , how to get the reference or it will be injected dynamically.
Exception:
02 Mar 2009 05:07:47,875 WARN [main] [com.elementk.service.cache.jboss.SimpleLmnkCache] handleNotification( javax.management.AttributeChangeNotification[source=lmnk.cache:service=CacheManager,name=BrandBroker.localesForBrand][type=jmx.attribute.change][message=SimpleLmnkCache starting] ) failed
java.lang.NullPointerException
at org.jboss.ha.framework.server.HAServiceImpl.callAsyncMethodOnPartition(HAServiceImpl.java:215)
at org.jboss.ha.framework.server.HAServiceImpl.handleEvent(HAServiceImpl.java:148)
at org.jboss.ha.jmx.AbstractHAServiceMBeanSupport.handleEvent(AbstractHAServiceMBeanSupport.java:373)
at org.jboss.ha.jmx.AbstractHAServiceMBeanSupport.sendNotificationRemote(AbstractHAServiceMBeanSupport.java:352)
at org.jboss.ha.jmx.AbstractHAServiceMBeanSupport.sendNotification(AbstractHAServiceMBeanSupport.java:325)
at org.jboss.system.ServiceMBeanSupport.sendStateChangeNotification(ServiceMBeanSupport.java:616)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:371)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:269)
at com.elementk.service.cache.jboss.SimpleLmnkManager.registerCacheMBean(SimpleLmnkManager.java:83)
at com.elementk.service.cache.jboss.SimpleLmnkManager.createCache(SimpleLmnkManager.java:61)
at com.elementk.service.cache.CacheManagerInvalidatorSupport.createCache(CacheManagerInvalidatorSupport.java:55)
at com.elementk.service.cache.CacheStartup.startClass(CacheStartup.java:37)
at com.elementk.util.servlet.StartupServlet.launchStartupClass(StartupServlet.java:132)
at com.elementk.util.servlet.StartupServlet.init(StartupServlet.java:84)
I have looked into the Jboss forum and source code for other similar issues. But have not got information to resolve this issue.
Any help on this very appreciated.
Thanks
Arul Kumar