Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-4547

empty message shows "Unsupported message body type which cannot be displayed by hawtio"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.31.2
    • 2.32.0
    • Web Console
    • None

    Description

      When an empty message is sent and it is viewed in the web console, there the error message "Unsupported message body type which cannot be displayed by hawtio" is shown.
      This includes empty messages sent from the console itself.

      I think the following will solve the problem:

      --- a/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/components/browse.js
      +++ b/artemis-hawtio/artemis-plugin/src/main/webapp/plugin/js/components/browse.js
      @@ -757,7 +757,7 @@ var Artemis;
               */
               function createBodyText(message) {
                   Artemis.log.debug("loading message:" + message);
      -            if (message.text) {
      +            if (message.text !== undefined) {
                       var body = message.text;
                       var lenTxt = "" + body.length;
                       message.textMode = "text (" + lenTxt + " chars)";
      

      but I need to test it before I submit the PR

      Attachments

        Issue Links

          Activity

            People

              erwindon Erwin Dondorp
              erwindon Erwin Dondorp
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m