Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-1526

ActiveMQServerControl.listConsumers() can fail with NullPointer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.4.0
    • 2.5.0
    • None
    • None

    Description

      race condition between ActiveMQServerControl.listConsumers() and closing client sessions can cause the following NullPointer

      java.lang.NullPointerException: null
      	at org.apache.activemq.artemis.core.management.impl.view.ConsumerView.toJson(Unknown Source)
      	at org.apache.activemq.artemis.core.management.impl.view.ConsumerView.toJson(Unknown Source)
      	at org.apache.activemq.artemis.core.management.impl.view.ActiveMQAbstractView.getResultsAsJson(ActiveMQAbstractView.java:68)
      	at org.apache.activemq.artemis.core.management.impl.ActiveMQServerControlImpl.listConsumers(ActiveMQServerControlImpl.java:1727)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:483)
      	at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:483)
      	at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
      	at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
      	at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
      	at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
      	at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
      

      The ActiveMQServerControl.listConsumers() retrieves the associated ServerSession and this may be null if the session has been closed AFTER the listConsumers() has been called but BEFORE the session is retrieved.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pgfox Pat Fox
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: