Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-3512

Using browse command fails when a message with an array of bytes is encountered.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.5.0
    • 5.6.0
    • Broker
    • None

    Description

      -bash-3.2$ /home/y/bin/activemq_server_admin browse --amqurl
      tcp://localhost:61616 VirtualTopicConsumers.ac4-stg-2.Soo_RMXReplicator_Primary

      ERROR: java.lang.RuntimeException: Failed to execute browse task. Reason: java.lang.reflect.InvocationTargetException
      java.lang.RuntimeException: Failed to execute browse task. Reason: java.lang.reflect.InvocationTargetException
      at org.apache.activemq.console.command.AmqBrowseCommand.runTask(AmqBrowseCommand.java:144)
      at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
      at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
      at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
      at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.activemq.console.Main.runTaskClass(Main.java:251)
      at org.apache.activemq.console.Main.main(Main.java:107)
      at yjava.activemq.server.admin.ActiveMQAdmin.main(ActiveMQAdmin.java:39)
      ERROR: java.lang.Exception: java.lang.reflect.InvocationTargetException
      java.lang.Exception: java.lang.reflect.InvocationTargetException
      at org.apache.activemq.console.command.AmqBrowseCommand.runTask(AmqBrowseCommand.java:145)
      at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
      at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
      at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
      at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:85)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.activemq.console.Main.runTaskClass(Main.java:251)
      at org.apache.activemq.console.Main.main(Main.java:107)
      at yjava.activemq.server.admin.ActiveMQAdmin.main(ActiveMQAdmin.java:39)
      Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.activemq.console.filter.MapTransformFilter.transformElement(MapTransformFilter.java:67)
      at org.apache.activemq.console.filter.ResultTransformFilter.transformList(ResultTransformFilter.java:67)
      at org.apache.activemq.console.filter.ResultTransformFilter.query(ResultTransformFilter.java:43)
      at org.apache.activemq.console.filter.PropertiesViewFilter.query(PropertiesViewFilter.java:58)
      at org.apache.activemq.console.filter.PropertiesViewFilter.query(PropertiesViewFilter.java:58)
      at org.apache.activemq.console.util.AmqMessagesUtil.filterMessagesView(AmqMessagesUtil.java:64)
      at org.apache.activemq.console.command.AmqBrowseCommand.runTask(AmqBrowseCommand.java:140)
      ... 11 more
      Caused by: java.lang.ClassCastException: [B cannot be cast to [Ljava.lang.Object;
      at org.apache.activemq.console.filter.MapTransformFilter.getDisplayString(MapTransformFilter.java:336)
      at org.apache.activemq.console.filter.MapTransformFilter.transformToMap(MapTransformFilter.java:213)
      ... 22 more
      -bash-3.2

      I'll attach a patch and a test case for getDisplayString shortly.

      Attachments

        1. AMQ_3512.patch
          3 kB
          Allen Reese

        Activity

          People

            Unassigned Unassigned
            areese Allen Reese
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: