Qpid
  1. Qpid
  2. QPID-2927

JMX Shutdown plugin throws InstanceNotFoundException during broker shutdown

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.7
    • Fix Version/s: 0.7
    • Component/s: Java Broker
    • Labels:
      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)

        Activity

        Robbie Gemmell created issue -
        Robbie Gemmell made changes -
        Field Original Value New Value
        Assignee Robbie Gemmell [ gemmellr ]
        Robbie Gemmell made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Robbie Gemmell made changes -
        Status In Progress [ 3 ] Ready To Review [ 10006 ]
        Sorin Suciu made changes -
        Attachment qpid-2927.patch [ 12458887 ]
        Marnie McCormack made changes -
        Status Ready To Review [ 10006 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Robbie Gemmell
            Reporter:
            Robbie Gemmell
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development