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

ActiveMQ Artemis CLI fails to export bindings without routing types

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.28.0
    • 2.29.0
    • None
    • None

    Description

      The ActiveMQ Artemis CLI fails to export a journal that contains a binding without routing types:

      $ ./broker/bin/artemis data exp
      
      <activemq-journal>
         <bindings>
            <address-binding routing-types="ANYCAST" name="DLQ" id="2"/>
            <address-binding routing-types="ANYCAST" name="ExpiryQueue" id="6"/>
            <address-binding routing-types="MULTICAST" name="activemq.notifications" id="10"/>
      java.lang.StringIndexOutOfBoundsException: begin 0, end -2, length 0
              at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4602)
              at java.base/java.lang.String.substring(String.java:2705)
              at org.apache.activemq.artemis.cli.commands.tools.xml.XmlDataExporter.printBindingsAsXML(XmlDataExporter.java:347)
              at org.apache.activemq.artemis.cli.commands.tools.xml.XmlDataExporter.printDataAsXML(XmlDataExporter.java:327)
              at org.apache.activemq.artemis.cli.commands.tools.xml.XmlDataExporter.writeXMLData(XmlDataExporter.java:155)
              at org.apache.activemq.artemis.cli.commands.tools.xml.XmlDataExporter.writeOutput(XmlDataExporter.java:148)
              at org.apache.activemq.artemis.cli.commands.tools.xml.XmlDataExporter.process(XmlDataExporter.java:137)
              at org.apache.activemq.artemis.cli.commands.tools.xml.XmlDataExporter.execute(XmlDataExporter.java:104)
              at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:212)
              at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:162)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:568)
              at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:144)
              at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:61)
      

      Attachments

        Issue Links

          Activity

            People

              brusdev Domenico Francesco Bruscino
              brusdev Domenico Francesco Bruscino
              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 - 10m
                  10m