Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-5168

IllegalArgumentException when using tab-completion with a wildcard in the path

XMLWordPrintable

      I wanted to get all the values of jms-queues' attribute core-address from the CLI and it works as expected:

      [standalone@localhost:9999 /] /subsystem=messaging/hornetq-server=default/jms-queue=*:read-attribute(name="queue-address")
      {
          "outcome" => "success",
          "result" => [
              {
                  "address" => [
                      ("subsystem" => "messaging"),
                      ("hornetq-server" => "default"),
                      ("jms-queue" => "myQueue")
                  ],
                  "outcome" => "success",
                  "result" => "jms.queue.myQueue"
              },
              {
                  "address" => [
                      ("subsystem" => "messaging"),
                      ("hornetq-server" => "default"),
                      ("jms-queue" => "HELLOWORLDMDBQueue2")
                  ],
                  "outcome" => "success",
                  "result" => "jms.queue.HELLOWORLDMDBQueue2"
              }
          ]
      }
      

      However when I tried to tab-complete the name of the attribute, I got an IllegalArgumentException and the console exited.

      [standalone@localhost:9999 /] /subsystem=messaging/hornetq-server=default/jms-queue=*:read-attribute(name=java.lang.IllegalArgumentException
              at org.jboss.dmr.ModelValue.getChild(ModelValue.java:108)
              at org.jboss.dmr.ModelNode.get(ModelNode.java:798)
              at org.jboss.as.cli.operation.impl.PropertyNameCompleter$1.getAllCandidates(PropertyNameCompleter.java:62)
              at org.jboss.as.cli.impl.DefaultCompleter.complete(DefaultCompleter.java:64)
              at org.jboss.as.cli.operation.OperationRequestCompleter.complete(OperationRequestCompleter.java:222)
              at org.jboss.as.cli.CommandCompleter.complete(CommandCompleter.java:93)
              at org.jboss.as.cli.impl.Console$Factory$1$1.complete(Console.java:96)
              at org.jboss.jreadline.console.Console.complete(Console.java:809)
              at org.jboss.jreadline.console.Console.read(Console.java:383)
              at org.jboss.jreadline.console.Console.read(Console.java:221)
              at org.jboss.as.cli.impl.Console$Factory$1.readLine(Console.java:166)
              at org.jboss.as.cli.impl.CommandContextImpl.interact(CommandContextImpl.java:1140)
              at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:243)
              at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:601)
              at org.jboss.modules.Module.run(Module.java:270)
              at org.jboss.modules.Main.main(Main.java:294)
      

              olubyans@redhat.com Alexey Loubyansky
              jmesnil1@redhat.com Jeff Mesnil
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: