Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-2047

config:edit -f command doesn't work on Windows platform

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.9
    • Fix Version/s: 2.2.10, 2.3.1
    • Component/s: karaf-config
    • Labels:
      None
    • Environment:

      Win 7, Java 7

      Description

      When try to edit a factory based configuration file with -f arg, an error info will be printed. for example:

      karaf@trun> config:edit -f org.apache.cxf.http.conduits-common
      Could not find configuration with file install property set to: org.apache.cxf.http.conduits-common

      but this command works fine on the Linux platform.

      1. fix.patch
        2 kB
        Xilai Dai

        Activity

        Hide
        xldai Xilai Dai added a comment -

        Found the root cause of this problem is the codes doesn't work in the findConfigurationByFileName() method of the ConfigCommandSupport class.

        on Windows, for example:
        absoluteFileName will be "file:\apache-karaf-2.2.9\etc\org.apache.cxf.http.conduits-common.cfg"
        fileInstallFileName will be "file:/D:/apache-karaf-2.2.9/etc/org.apache.cxf.http.conduits-common.cfg"

        so will lead to mismatch and findConfigurationByFileName() will return null.

        Show
        xldai Xilai Dai added a comment - Found the root cause of this problem is the codes doesn't work in the findConfigurationByFileName() method of the ConfigCommandSupport class. on Windows, for example: absoluteFileName will be "file :\apache-karaf-2.2.9\etc\org.apache.cxf.http.conduits-common.cfg" fileInstallFileName will be "file:/D:/apache-karaf-2.2.9/etc/org.apache.cxf.http.conduits-common.cfg" so will lead to mismatch and findConfigurationByFileName() will return null.
        Hide
        xldai Xilai Dai added a comment - - edited

        patch attached for 2.2.9. works both on Windowns/Linux platform.

        Show
        xldai Xilai Dai added a comment - - edited patch attached for 2.2.9. works both on Windowns/Linux platform.
        Hide
        jbonofre Jean-Baptiste Onofré added a comment -

        Your patch is not complete as the same change should be done on the MBeans (same method call). I'm updating the patch. Thanks.

        Show
        jbonofre Jean-Baptiste Onofré added a comment - Your patch is not complete as the same change should be done on the MBeans (same method call). I'm updating the patch. Thanks.
        Show
        jbonofre Jean-Baptiste Onofré added a comment - Fix on karaf-2.2.x: http://svn.apache.org/viewvc?view=revision&revision=1422940
        Show
        jbonofre Jean-Baptiste Onofré added a comment - Fix on karaf-2.3.x: http://svn.apache.org/viewvc?view=revision&revision=1422946

          People

          • Assignee:
            jbonofre Jean-Baptiste Onofré
            Reporter:
            xldai Xilai Dai
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development