You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (Jira)" <ji...@apache.org> on 2022/07/18 19:06:00 UTC

[jira] [Updated] (ARTEMIS-3861) Java 8 Mitigate NPE when browsing messages

     [ https://issues.apache.org/jira/browse/ARTEMIS-3861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Bertram updated ARTEMIS-3861:
------------------------------------
    Description: 
The fix from ARTEMIS-3677 is needed for the v2.19.x series to allow browsing of messages in Java 8 environments otherwise this NPE is thrown:
{noformat}
Caused by: java.lang.NullPointerException
        at org.apache.activemq.artemis.api.core.JsonUtil.truncate(JsonUtil.java:331) ~[?:?]
        at org.apache.activemq.artemis.api.core.Message.toPropertyMap(Message.java:763) ~[?:?]
        at org.apache.activemq.artemis.api.core.ICoreMessage.toMap(ICoreMessage.java:114) ~[?:?]
        at org.apache.activemq.artemis.core.management.impl.QueueControlImpl.getFirstMessage(QueueControlImpl.java:907) ~[?:?]
        at org.apache.activemq.artemis.core.management.impl.QueueControlImpl.getFirstMessageAsJSON(QueueControlImpl.java:922) ~[?:?]{noformat}

  was:
This fix for JsonUtil.java from ARTEMIS-3677 is needed for the v2.19.x series to allow browsing of messages in Java 8 environments

 
{code:java}
Caused by: java.lang.NullPointerException
        at org.apache.activemq.artemis.api.core.JsonUtil.truncate(JsonUtil.java:331) ~[?:?]
        at org.apache.activemq.artemis.api.core.Message.toPropertyMap(Message.java:763) ~[?:?]
        at org.apache.activemq.artemis.api.core.ICoreMessage.toMap(ICoreMessage.java:114) ~[?:?]
        at org.apache.activemq.artemis.core.management.impl.QueueControlImpl.getFirstMessage(QueueControlImpl.java:907) ~[?:?]
        at org.apache.activemq.artemis.core.management.impl.QueueControlImpl.getFirstMessageAsJSON(QueueControlImpl.java:922) ~[?:?] {code}


> Java 8 Mitigate NPE when browsing messages
> ------------------------------------------
>
>                 Key: ARTEMIS-3861
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3861
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.19.0, 2.19.1
>            Reporter: Phil Haeusler
>            Priority: Major
>
> The fix from ARTEMIS-3677 is needed for the v2.19.x series to allow browsing of messages in Java 8 environments otherwise this NPE is thrown:
> {noformat}
> Caused by: java.lang.NullPointerException
>         at org.apache.activemq.artemis.api.core.JsonUtil.truncate(JsonUtil.java:331) ~[?:?]
>         at org.apache.activemq.artemis.api.core.Message.toPropertyMap(Message.java:763) ~[?:?]
>         at org.apache.activemq.artemis.api.core.ICoreMessage.toMap(ICoreMessage.java:114) ~[?:?]
>         at org.apache.activemq.artemis.core.management.impl.QueueControlImpl.getFirstMessage(QueueControlImpl.java:907) ~[?:?]
>         at org.apache.activemq.artemis.core.management.impl.QueueControlImpl.getFirstMessageAsJSON(QueueControlImpl.java:922) ~[?:?]{noformat}



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