Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-10127

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 9.4.14.Final, 10.0.0.Beta4
    • 9.4.12.Final, 10.0.0.Beta3
    • CLI
    • None
    • 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
    • Hide

      change the site name to not use special character

      Show
      change the site name to not use special character

    Description

      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
      

      Attachments

        Issue Links

          Activity

            People

              ttarrant@redhat.com Tristan Tarrant
              ttarrant@redhat.com Tristan Tarrant
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: