Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-2494

Error "mismatched input" in JDG CLI when trying to run site command with a hyphen in site's name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.3.2.ER1
    • JDG 7.1.2 GA
    • CLI
    • None
    • ER1
    • +
    • Hide

      change the site name to not use special character

      Show
      change the site name to not use special character
    • Hide
      1. Use the example configuration file found in $JDG_SERVER_HOME/docs/examples/configs/clustered-xsite.xml. Add a distributed cache or edit the existing file and change the "NYC" values to a value with a hyphen, such as "site-01". I'll attach the file I've used to reproduce this.
      2. Start the JDG server using the edited file and connect to the CLI.
      3. Navigate to the cache level and try to get the site status:
      [standalone@localhost:9990 /] container clustered
      [standalone@localhost:9990 cache-container=clustered] cache default
      [standalone@localhost:9990 distributed-cache=default] site --status site-01
      line 1:14 mismatched input 'site' expecting set null
      line 1:20 mismatched input '1' expecting set null
      
      Show
      Use the example configuration file found in $JDG_SERVER_HOME/docs/examples/configs/clustered-xsite.xml . Add a distributed cache or edit the existing file and change the "NYC" values to a value with a hyphen, such as "site-01". I'll attach the file I've used to reproduce this. Start the JDG server using the edited file and connect to the CLI. Navigate to the cache level and try to get the site status: [standalone@localhost:9990 /] container clustered [standalone@localhost:9990 cache-container=clustered] cache default [standalone@localhost:9990 distributed-cache= default ] site --status site-01 line 1:14 mismatched input 'site' expecting set null line 1:20 mismatched input '1' expecting set null
    • JDG Sprint #28

      An error message is returned when trying to get status of a site in JDG CLI, possibly because the site name has a hyphen character on it.

      The following example of the site command being executed in CLI shows the response I've got, trying to execute in different ways:

      [standalone@localhost:9990 distributed-cache=default] site --status site-01
      line 1:14 mismatched input 'site' expecting set null
      line 1:20 mismatched input '1' expecting set null
      [standalone@localhost:9990 distributed-cache=default] site --status 'site-01'
      Incorrect site name: 'site-01'
      [standalone@localhost:9990 distributed-cache=default] site --status "site-01"
      Incorrect site name: "site-01"
      [standalone@localhost:9990 distributed-cache=default] site --status {site-01}
      line 1:14 mismatched input '{' expecting set null
      line 1:21 mismatched input '1' expecting set null
      [standalone@localhost:9990 distributed-cache=default] site --status "{site-01}"
      Incorrect site name: "{site-01}"
      

      However, if I try to execute the following command with a site name without the hyphen character in it's value, everything works as expected:

      [standalone@localhost:9990 distributed-cache=default] site --status SFO
      online
      

              ttarrant@redhat.com Tristan Tarrant
              adsouza@redhat.com Adriano Souza (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: