Karaf
  1. Karaf
  2. KARAF-954

Double quotes missing in generated karaf-wrapper.conf

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.4
    • Fix Version/s: 2.2.5, 3.0.0
    • Component/s: karaf-os-integration
    • Labels:
      None
    • Environment:

      Windows 7, 64bit

      Description

      Double quotes around path names are missing in generated karaf-wrapper.conf in version 2.2.4. Were present in 2.2.2.

      with 2.2.4:

      wrapper.java.additional.7=-Djava.endorsed.dirs=%JAVA_HOME%/jre/lib/endorsed;%JAVA_HOME%/lib/endorsed;%KARAF_HOME%/lib/endorsed
      wrapper.java.additional.8=-Djava.ext.dirs=%JAVA_HOME%/jre/lib/ext;%JAVA_HOME%/lib/ext;%KARAF_HOME%/lib/ext

      with 2.2.2:
      wrapper.java.additional.7=-Djava.endorsed.dirs="%JAVA_HOME%/jre/lib/endorsed;%JAVA_HOME%/lib/endorsed;%KARAF_HOME%/lib/endorsed"
      wrapper.java.additional.8=-Djava.ext.dirs="%JAVA_HOME%/jre/lib/ext;%JAVA_HOME%/lib/ext;%KARAF_HOME%/lib/ext"

      The missing quotes lead to NoClassDefFound exceptions due to invalid path definitions.

        Issue Links

          Activity

          Hide
          Jean-Baptiste Onofré added a comment -

          I re-added the " in the Unix conf wrapper.

          I'm launching test on Linux and Windows VM to be sure that it works fine.

          Show
          Jean-Baptiste Onofré added a comment - I re-added the " in the Unix conf wrapper. I'm launching test on Linux and Windows VM to be sure that it works fine.
          Hide
          Jean-Baptiste Onofré added a comment -

          For now, the fix is only on the karaf-2.2.x branch waiting for the VMs tests result.

          Show
          Jean-Baptiste Onofré added a comment - For now, the fix is only on the karaf-2.2.x branch waiting for the VMs tests result.
          Hide
          Markus Stier added a comment -

          I stumbled upon the "Unix conf wrapper". I've had this problem on windows 7...

          Show
          Markus Stier added a comment - I stumbled upon the "Unix conf wrapper". I've had this problem on windows 7...
          Hide
          Jean-Baptiste Onofré added a comment -

          Test OK on Linux (including ssh access).
          Test OK on Windows (including ssh access).

          Show
          Jean-Baptiste Onofré added a comment - Test OK on Linux (including ssh access). Test OK on Windows (including ssh access).
          Hide
          Jean-Baptiste Onofré added a comment -

          Markus, don't you have space in the path to your JAVA_HOME or your KARAF_HOME ?

          I tested on Windows XP, Ubuntu and RedHat without problem. I had an issue on Windows when the JAVA_HOME or Karaf were in the Program Files folder.

          Show
          Jean-Baptiste Onofré added a comment - Markus, don't you have space in the path to your JAVA_HOME or your KARAF_HOME ? I tested on Windows XP, Ubuntu and RedHat without problem. I had an issue on Windows when the JAVA_HOME or Karaf were in the Program Files folder.
          Hide
          Markus Stier added a comment -

          JP,
          yes I have space in my JAVA_HOME:

          JAVA_HOME=c:\Program Files (x86)\Java\jre6

          I missed to mention that in the initial bug report. Should have written:

          The missing quotes lead to NoClassDefFound exceptions due to invalid path definitions if JAVA_HOME contains spaces.

          Show
          Markus Stier added a comment - JP, yes I have space in my JAVA_HOME: JAVA_HOME=c:\Program Files (x86)\Java\jre6 I missed to mention that in the initial bug report. Should have written: The missing quotes lead to NoClassDefFound exceptions due to invalid path definitions if JAVA_HOME contains spaces.
          Hide
          Jean-Baptiste Onofré added a comment -

          Thanks for the update Markus.

          Even if the last commit, I'm not sure that it works on Windows if there is space.

          I'm gonna to make some tests with path containing space to find a way to work with it.

          Show
          Jean-Baptiste Onofré added a comment - Thanks for the update Markus. Even if the last commit, I'm not sure that it works on Windows if there is space. I'm gonna to make some tests with path containing space to find a way to work with it.
          Hide
          Fernando Ribeiro added a comment -

          Curiously enough, I had the same problem as the reporter of ESB-1557 when using quotes and not having spaces in JAVA_HOME on CentOS 5.6, does it make sense to anyone?

          Show
          Fernando Ribeiro added a comment - Curiously enough, I had the same problem as the reporter of ESB-1557 when using quotes and not having spaces in JAVA_HOME on CentOS 5.6, does it make sense to anyone?
          Hide
          Gert Vanthienen added a comment -

          @Fernando: The key differentiator is the OS - in this issue, the reporter is using Windows which requires the quotes. For ESB-1557 and KARAF-816, the OS is Linux/Unix, for which there shouldn't be quotes in those parameters. From my tests, the *nix variants are OK now - Jean-Baptiste was planning to give things another go on Windows with the spaces in the path.

          Show
          Gert Vanthienen added a comment - @Fernando: The key differentiator is the OS - in this issue, the reporter is using Windows which requires the quotes. For ESB-1557 and KARAF-816 , the OS is Linux/Unix, for which there shouldn't be quotes in those parameters. From my tests, the *nix variants are OK now - Jean-Baptiste was planning to give things another go on Windows with the spaces in the path.
          Hide
          Fernando Ribeiro added a comment -

          Understood, thanks!

          Show
          Fernando Ribeiro added a comment - Understood, thanks!
          Hide
          Jean-Baptiste Onofré added a comment -

          Tested successfully on Windows, with JAVA_HOME and Karaf installed in a path containing spaces:
          JAVA_HOME=C:\Program Files\Java\jdk1.6.0_27
          KARAF_HOME=C:\Documents and Settings\jbonofre\Mes documents\apache-karaf-2.2.5-SNAPSHOT

          The Karaf service installation is OK and the startup is fine.
          I tried a ssh connection, no problem as well.

          => Tests OK on Windows

          Show
          Jean-Baptiste Onofré added a comment - Tested successfully on Windows, with JAVA_HOME and Karaf installed in a path containing spaces: JAVA_HOME=C:\Program Files\Java\jdk1.6.0_27 KARAF_HOME=C:\Documents and Settings\jbonofre\Mes documents\apache-karaf-2.2.5-SNAPSHOT The Karaf service installation is OK and the startup is fine. I tried a ssh connection, no problem as well. => Tests OK on Windows
          Hide
          Jean-Baptiste Onofré added a comment -

          Tested on Ubuntu also with spaces in path => OK

          Show
          Jean-Baptiste Onofré added a comment - Tested on Ubuntu also with spaces in path => OK

            People

            • Assignee:
              Jean-Baptiste Onofré
              Reporter:
              Markus Stier
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development