You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Erwin Dondorp (Jira)" <ji...@apache.org> on 2021/11/01 21:59:00 UTC
[jira] [Created] (ARTEMIS-3550) binary amqp message causes NPE when
viewed in web console
Erwin Dondorp created ARTEMIS-3550:
--------------------------------------
Summary: binary amqp message causes NPE when viewed in web console
Key: ARTEMIS-3550
URL: https://issues.apache.org/jira/browse/ARTEMIS-3550
Project: ActiveMQ Artemis
Issue Type: Bug
Components: Web Console
Affects Versions: 2.19.0
Reporter: Erwin Dondorp
using an amqp message with just a byte array as body.
when viewed in the webconsole this results in a NullPointerException.
the code tries to comparing the contenttype header, which is absent here.
the resulting null-pointer is used, causing that NPE.
fixable by testing for a null-pointer in AMQPMessage.java(1904):
{code:java}
if (contentType != null && contentType.equals(AMQPMessageSupport.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE)) {
{code}
note: 3 other occurrences of {{contentType.equals}} seem to be safe based on visual inspection.
the original stack trace:
{noformat}
2021-11-01 21:42:18,343 WARN [org.apache.activemq.artemis.core.management.impl.QueueControlImpl] null: java.lang.NullPointerException
at org.apache.activemq.artemis.protocol.amqp.broker.AMQPMessage$AmqpMessageOpenTypeFactory.getTypeAMQPMessage.java:1904)
at org.apache.activemq.artemis.protocol.amqp.broker.AMQPMessage$AmqpMessageOpenTypeFactory.getFields(AMQPMessage.java:1847)
at org.apache.activemq.artemis.protocol.amqp.broker.AMQPMessage$AmqpMessageOpenTypeFactory.getFields(AMQPMessage.java:1830)
at org.apache.activemq.artemis.protocol.amqp.broker.AMQPMessage.toCompositeData(AMQPMessage.java:1922)
at org.apache.activemq.artemis.core.management.impl.QueueControlImpl.browse(QueueControlImpl.java:1588)
...
{noformat}
I will add a PR to this issue as soon as I can, but feel free to beat me on that, as my "vanilla" development environment is a bit unusable at the moment.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)