AssertionError when registering an MXBean with an ObjectName already in use.

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 6
    • Affects Version/s: 6
    • Component/s: core-svc
    • None
    • b40
    • 6
    • b47
    • generic
    • generic

      Error when trying to register an MXBean using the ObjectName
      of an MBean which already exists in the MBeanServer.

      The following exception is thrown but were expecting
      InstanceAlreadyExistsException instead.

      See test in attachment for more detailed info.

      ----

      >>> Create the MBean server

      >>> Create the Test1 MBean within the MBeanServer
      ObjectName = domain:type=Test1

      >>> Create the Test2 MXBean within the MBeanServer
      ObjectName = domain:type=Test1
      Exception in thread "main" javax.management.RuntimeErrorException: Error thrown in postRegister method
      at com.sun.jmx.mbeanserver.BaseMetaDataImpl.postRegisterInvoker(BaseMetaDataImpl.java:112)
      at com.sun.jmx.mbeanserver.MetaDataImpl.postRegisterInvoker(MetaDataImpl.java:207)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1558)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:991)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:396)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:493)
      at MXBeanRegistrationTest.main(MXBeanRegistrationTest.java:50)
      Caused by: java.lang.AssertionError: inconsistent MXBeanLookup use
      at com.sun.jmx.mbeanserver.MXBeanLookup.removeReference(MXBeanLookup.java:37)
      at com.sun.jmx.mbeanserver.MXBeanSupport.postDeregister(MXBeanSupport.java:285)
      at com.sun.jmx.mbeanserver.MXBeanSupport.postRegister(MXBeanSupport.java:277)
      at com.sun.jmx.mbeanserver.BaseMetaDataImpl.postRegisterInvoker(BaseMetaDataImpl.java:106)
      ... 6 more

      ###@###.### 2005-06-10 13:44:43 GMT
      ###@###.### 2005-06-10 13:47:21 GMT

            Assignee:
            Eamonn McManus
            Reporter:
            Luis-Miguel Alventosa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: