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

variable substitution doesn't work for system.properties

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.3, 3.0.0
    • Component/s: None
    • Labels:
      None

      Description

      for example in system.properties we have
      karaf.name=root
      and
      jmx.url=service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-${karaf.name}
      if jmx.url was loaded before karaf.name then the variable substitution doesn't work
      we get the
      jmx.url=service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-
      after variable substitution.

      The error comes from that in
      Main.loadSystemProperties() method we have
      System.setProperty(name, substVars(value, name, null, null));
      which is incorrect, we should use
      System.setProperty(name, substVars(value, name, null, props));
      instead

        Attachments

          Activity

            People

            • Assignee:
              ffang Freeman Fang
              Reporter:
              ffang Freeman Fang
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: