Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-16412

camel-core - Environment Variables in Properties Source location no longer works

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.7.3, 3.8.0
    • 3.7.4, 3.10.0
    • camel-core
    • None
    • Unknown

    Description

      We are using environment variables in our Location of the propertiesPlaceholder to control the location of our properties during the different stages of our deployments, according to his doc:

      https://camel.apache.org/manual/latest/using-propertyplaceholder.html#UsingPropertyPlaceholder-UsingSystemandEnvironmentVariablesinLocations.

      <propertiesLocation resolver="file" path="${env.SECRETS_LOCATION}/tif.secrets"/>

      This now results in a FileNotFoundException:

       

      Caused by: java.io.FileNotFoundException: ${env:SECRETS_LOCATION}/tif.secrets (No such file or directory)Caused by: java.io.FileNotFoundException: ${env:SECRETS_LOCATION}/tif.secrets (No such file or directory) at java.base/java.io.FileInputStream.open0(Native Method) at java.base/java.io.FileInputStream.open(FileInputStream.java:219) at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157) at java.base/java.io.FileInputStream.<init>(FileInputStream.java:112) at org.apache.camel.component.properties.FilePropertiesSource.loadPropertiesFromLocation(FilePropertiesSource.java:51) ... 63 more

       

      I think the change in CAMEL-15781 causes this.

       

      A workaround is to replace "env:" with "env.".

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            r.schoen@topdesk.com Remco Schoen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: