[jboss-user] [JBossCache] - JbossCache 1.4.1 problem/bug

vbatista do-not-reply at jboss.com
Wed Feb 7 22:33:35 EST 2007

   I have just migrated JbossCache from version 1.2.4-SP2 to version 1.4.1 (I am using Jboss 4.0.3-SP1 and JVM 1.5).
   While initializing the cache, I was getting the following error:
        at org.jboss.cache.TreeCache.getMBeanServer(TreeCache.java:6484)
        at org.jboss.cache.TreeCache._createService(TreeCache.java:1383)
        at org.jboss.cache.TreeCache.createService(TreeCache.java:1346)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245)
        at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:173)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:265)
        at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:181)

      With version 1.2.4 everything was working fine. Loooking to JbossCache src code, the NullPointer occurs on the line server.getDefaultDomain().equalsIgno...  :

      // return 'jboss' server if available
      for (int i = 0; i < servers.size(); i++)
         MBeanServer server = (MBeanServer) servers.get(i);
         if (server.getDefaultDomain().equalsIgnoreCase(JBOSS_SERVER_DOMAIN))    
            return server;

    While looking for a solution to the problem, I realized that I was using the default JVM MBeanServer for Jboss:

     This is the problem. I commented the option above, and everything worked fine. Why am I getting the NullPointerException. Does the call to server.getDefaultDomain() on the default MBeanServer returns Null?

    Thanks in advance.
    Best Regards,
       Victor Batista

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012796#4012796

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012796

More information about the jboss-user mailing list