Karaf
  1. Karaf
  2. KARAF-1143

Karaf (Config Mbean) can not recognize the features when Karaf installation path containing blank space

    Details

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

      Windows 7 platform

      Description

      Install Karaf into a directory with blank space in windows platform, such as: D:\manual test\apache-karaf-2.2.5, then start Karaf console by typing bin/karaf.bat.

      After Karaf start, run some scripts using the following command: source scripts/configureC0.sh, Karaf thrown an exception:

      "Error executing command: D:\manual%20test\apache-karaf-2.2.5\etc\org.apache.karaf.management.cfg (System can not Found the specified path)"

      Note: The content of scripts file: D:\manual test\apache-karaf-2.2.5\scripts\configureC0.sh:

      echo "################################ START #############################################"
      echo "JMX Management configuration (etc/org.apache.karaf.management.cfg)"
      config:edit --force org.apache.karaf.management
      echo "rmiRegistryPort = 1100"
      config:propset rmiRegistryPort 1100
      echo "rmiServerPort = 44445"
      config:propset rmiServerPort 44445
      config:update

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        61d 11h 44m 1 Jean-Baptiste Onofré 11/Mar/12 20:34
        In Progress In Progress Resolved Resolved
        3d 21h 23m 1 Jean-Baptiste Onofré 15/Mar/12 17:58
        Resolved Resolved Closed Closed
        24d 15h 34m 1 Jamie goodyear 09/Apr/12 10:33
        Jamie goodyear made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Jean-Baptiste Onofré made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Jean-Baptiste Onofré added a comment -

        I replace the "old" string handling by an URL/URI handling. Like this, special "characters" (like space) are handled.

        Test in progress, I will commit soon.

        Show
        Jean-Baptiste Onofré added a comment - I replace the "old" string handling by an URL/URI handling. Like this, special "characters" (like space) are handled. Test in progress, I will commit soon.
        Hide
        Jean-Baptiste Onofré added a comment -

        It's the same behavior for the ConfigMBean (as it uses the same code as the ConfigCommandSupport).

        Show
        Jean-Baptiste Onofré added a comment - It's the same behavior for the ConfigMBean (as it uses the same code as the ConfigCommandSupport).
        Hide
        Jean-Baptiste Onofré added a comment -

        I confirm it fails on a Windows VM on:

        at java.io.FileOutputStream.open
        at org.apache.karaf.util.Properties.save(Properties.java:111)
        at org.apache.karaf.util.Properties.save(Properties.java:107)
        at ConfigCommandSupport.persistConfiguration(ConfigCommandSupport.java:179)

        Show
        Jean-Baptiste Onofré added a comment - I confirm it fails on a Windows VM on: at java.io.FileOutputStream.open at org.apache.karaf.util.Properties.save(Properties.java:111) at org.apache.karaf.util.Properties.save(Properties.java:107) at ConfigCommandSupport.persistConfiguration(ConfigCommandSupport.java:179)
        Hide
        Jean-Baptiste Onofré added a comment -

        I tested on Ubuntu and Fedora without problem.

        Karaf is installed in a patch containing space and braces. I don't have error performing the script and the etc file is correctly updated.

        I will reproduce it on a Windows VM.

        Show
        Jean-Baptiste Onofré added a comment - I tested on Ubuntu and Fedora without problem. Karaf is installed in a patch containing space and braces. I don't have error performing the script and the etc file is correctly updated. I will reproduce it on a Windows VM.
        Jean-Baptiste Onofré made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Jean-Baptiste Onofré made changes -
        Fix Version/s 2.2.6 [ 12319142 ]
        Fix Version/s 3.0.0 [ 12316040 ]
        Jean-Baptiste Onofré made changes -
        Assignee Jean-Baptiste Onofré [ jbonofre ]
        Guangyu Cui made changes -
        Field Original Value New Value
        Description Install Karaf into a directory with blank space in windows platform, such as: D:\manual test\apache-karaf-2.2.5, then start Karaf console by typing bin/karaf.bat.

        After Karaf start, run some scripts using the following command: source scripts/configureC0.sh, Karaf thrown an exception:

        "Error executing command: D:\manual%20test\apache-karaf-2.2.5\etc\org.apache.karaf.management.cfg (System can not Found the specified path)"

        Install Karaf into a directory with blank space in windows platform, such as: D:\manual test\apache-karaf-2.2.5, then start Karaf console by typing bin/karaf.bat.

        After Karaf start, run some scripts using the following command: source scripts/configureC0.sh, Karaf thrown an exception:

        "Error executing command: D:\manual%20test\apache-karaf-2.2.5\etc\org.apache.karaf.management.cfg (System can not Found the specified path)"


        Note: The content of scripts file: D:\manual test\apache-karaf-2.2.5\scripts\configureC0.sh:

        echo "################################ START #############################################"
        echo "JMX Management configuration (etc/org.apache.karaf.management.cfg)"
        config:edit --force org.apache.karaf.management
        echo "rmiRegistryPort = 1100"
        config:propset rmiRegistryPort 1100
        echo "rmiServerPort = 44445"
        config:propset rmiServerPort 44445
        config:update

        Guangyu Cui created issue -

          People

          • Assignee:
            Jean-Baptiste Onofré
            Reporter:
            Guangyu Cui
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development