Dmitriy Nozdrya created ARTEMIS-5445:
----------------------------------------

             Summary: Throw NPE when AMQP Large message is processed by 
moveBetweenSnFQueues
                 Key: ARTEMIS-5445
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5445
             Project: ActiveMQ Artemis
          Issue Type: Bug
          Components: AMQP
    Affects Versions: 2.33.0
            Reporter: Dmitriy Nozdrya
         Attachments: AMQPLargeMessage-1.png, CoreLargeServerMessage.png

The NullPointerException occurs when AMQPLargeMessage is processed by 
org.apache.activemq.artemis.core.server.impl.QueueImpl#moveBetweenSnFQueues

 
{code:java}
2025-04-16 20:48:48.564 [Thread-7 (ActiveMQ-client-global-threads)] WARN  
o.a.activemq.artemis.core.server.cluster.impl.BridgeImpl  - null
java.lang.NullPointerException: null
        at java.base/java.nio.ByteBuffer.wrap(ByteBuffer.java:422)
        at 
org.apache.activemq.artemis.core.server.impl.QueueImpl.moveBetweenSnFQueues(QueueImpl.java:3694)
        at 
org.apache.activemq.artemis.core.server.impl.QueueImpl$9.actMessage(QueueImpl.java:2796)
        at 
org.apache.activemq.artemis.core.server.impl.QueueImpl.iterQueue(QueueImpl.java:2309)
        at 
org.apache.activemq.artemis.core.server.impl.QueueImpl.moveReferencesBetweenSnFQueues(QueueImpl.java:2793)
        at 
org.apache.activemq.artemis.core.server.cluster.impl.BridgeImpl.scaleDown(BridgeImpl.java:712)
        at 
org.apache.activemq.artemis.core.server.cluster.impl.BridgeImpl.connectionFailed(BridgeImpl.java:692)
        at 
org.apache.activemq.artemis.spi.core.protocol.AbstractRemotingConnection.callFailureListeners(AbstractRemotingConnection.java:98)
        at 
org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.fail(RemotingConnectionImpl.java:209)
        at 
org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl$CloseRunnable.run(ClientSessionFactoryImpl.java:1182)
        at 
org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:57)
        at 
org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:32)
        at 
org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:68)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at 
org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
 {code}
 

For AMQPLargeMessage, HDR_ROUTE_TO_IDS header is in the extraProperties field. 
The message copy has extraProperties that is null, and when 
copyMessage.getPropertyNames() is called, only the message's 
applicationProperties are processed.

On examples(in attachment) of calling copyMessage.getPropertyNames for 
AMQPLargeMessage and CoreLargeServerMessage
 # For AMQPLargeMessage - _AMQ_ROUTE_TO header is missing
 # For CoreLargeServerMessage - _AMQ_ROUTE_TO header is present

 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to