JMX ManagedQueue methods moveMessage/copyMessage operations can throw 
NullPointerException
------------------------------------------------------------------------------------------

                 Key: QPID-3634
                 URL: https://issues.apache.org/jira/browse/QPID-3634
             Project: Qpid
          Issue Type: Bug
          Components: Java Broker
    Affects Versions: 0.12, 0.10, 0.5, 0.14, 0.15
            Reporter: Keith Wall
            Assignee: Keith Wall


Calls to JMX methods ManagedQueue#moveMesssage and ManagedQueue#copyMessage can 
throw NullPointerException.   This will happen if there is a consumer attached 
to the destination queue and the subscription changes state.  This can easily 
be seen with consumers with a low prefetch.  The exception will be seen once 
the pre-fetch buffer is full.

The underlying issue is the absence on a logging actor on the JMX thread.   
Some JMX methods are adding a logging actor, some are not.


{code}
java.lang.NullPointerException
at 
org.apache.qpid.server.subscription.SubscriptionImpl.creditStateChanged(SubscriptionImpl.java:616)
at 
org.apache.qpid.server.flow.AbstractFlowCreditManager.notifyListeners(AbstractFlowCreditManager.java:46)
at 
org.apache.qpid.server.flow.AbstractFlowCreditManager.setSuspended(AbstractFlowCreditManager.java:54)
at 
org.apache.qpid.server.flow.Pre0_10CreditManager.useCreditForMessage(Pre0_10CreditManager.java:156)
at 
org.apache.qpid.server.subscription.SubscriptionImpl.wouldSuspend(SubscriptionImpl.java:540)
at 
org.apache.qpid.server.queue.SimpleAMQQueue.deliverToSubscription(SimpleAMQQueue.java:484)
at org.apache.qpid.server.queue.SimpleAMQQueue.enqueue(SimpleAMQQueue.java:450)
at org.apache.qpid.server.queue.SimpleAMQQueue.enqueue(SimpleAMQQueue.java:367)
at 
org.apache.qpid.server.queue.SimpleAMQQueue.moveMessagesToAnotherQueue(SimpleAMQQueue.java:953)
at 
org.apache.qpid.server.queue.AMQQueueMBean.moveMessages(AMQQueueMBean.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)
at 
com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27)
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)
at javax.management.StandardMBean.invoke(StandardMBean.java:391)
at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
{code}



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to