You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Robbie Gemmell (Jira)" <ji...@apache.org> on 2021/11/02 09:17:00 UTC
[jira] [Commented] (ARTEMIS-3550) binary amqp message causes NPE
when viewed in web console
[ https://issues.apache.org/jira/browse/ARTEMIS-3550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17437212#comment-17437212 ]
Robbie Gemmell commented on ARTEMIS-3550:
-----------------------------------------
https://github.com/apache/activemq-artemis/pull/3832 was merged an hour before you raised this and included a fix for that ;)
> 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.20.0
> Reporter: Erwin Dondorp
> Priority: Major
>
> 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)