Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-2927

JMX Shutdown plugin throws InstanceNotFoundException during broker shutdown

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.7
    • 0.7
    • Broker-J
    • None

    Description

      If the broker is stopped cleanly it emits an InstanceNotFoundException on the terminal when stopping the JMX Shutdown plugin bundle. This is because the when the ApplicationRegistry shutdown hook is run, the JMXManagedObjectRegistry unregisters all MBeans in the 'org.apache.qpid' domain whilst closing, presumably before Felix is shut down and thus causing the Shutdown plugin to fail when trying to unregister the shutdown MBean again explicitly.

      This can be handled by simply catching the INFE in the Activator, such that the MBean is unregistered if the bundle were to be stopped before the broker, but no exception is thrown in the reverse case.

      ERROR: Error stopping bundle. (javax.management.InstanceNotFoundException: org.apache.qpid:type=ShutdownMBean)
      javax.management.InstanceNotFoundException: org.apache.qpid:type=ShutdownMBean
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(DefaultMBeanServerInterceptor.java:415)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:403)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:506)
      at org.apache.qpid.shutdown.Activator.stop(Activator.java:59)
      at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:683)
      at org.apache.felix.framework.Felix.stopBundle(Felix.java:2128)
      at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1152)
      at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
      at java.lang.Thread.run(Thread.java:619)

      Attachments

        1. qpid-2927.patch
          1 kB
          Sorin Suciu

        Activity

          People

            robbie Robbie Gemmell
            robbie Robbie Gemmell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: