Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-5241

Jboss-cli issue with spaces in JAVA_OPTS on Unix

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • CLI
    • None
    • Hide

      This is the scenario which fails on Unix systems:

      $ export JAVA_OPTS="-Dtestparameter=\"Something with spaces\""
      $ ./jboss-cli.sh
      Error: Could not find or load main class with
      
      Caused by: java.lang.ClassNotFoundException: with
      

      This was tested on various unix operating systems and was specific to jboss-cli.sh, the Windows variant was fine. We tested WF10 (no error), WF21 (error above). No combination of escaping and quotes has worked on WF21. The temporary workaround I use while using WF21 is temporarily unsetting JAVA_OPTS before using the jboss-cli which works well.

      Show
      This is the scenario which fails on Unix systems: $ export JAVA_OPTS= "-Dtestparameter=\" Something with spaces\"" $ ./jboss-cli.sh Error: Could not find or load main class with Caused by: java.lang.ClassNotFoundException: with This was tested on various unix operating systems and was specific to jboss-cli.sh, the Windows variant was fine. We tested WF10 (no error), WF21 (error above). No combination of escaping and quotes has worked on WF21. The temporary workaround I use while using WF21 is temporarily unsetting JAVA_OPTS before using the jboss-cli which works well.
    • Undefined

      When having spaces in JAVA_OPTS on a Unix machine, calls to jboss-cli.sh will fail (see repro steps for the error). It looks like spaces aren't handled well. It works fine for WF10 but fails on WF21, I'm not sure about the versions in between.

              chaowan@redhat.com Chao Wang
              davykoravand@gmail.com Davy Koravand (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: