Remco Schoen created CAMEL-16412:
------------------------------------

             Summary: Environment Variables in Location no longer working
                 Key: CAMEL-16412
                 URL: https://issues.apache.org/jira/browse/CAMEL-16412
             Project: Camel
          Issue Type: Bug
          Components: camel-properties
    Affects Versions: 3.8.0, 3.7.3
            Reporter: Remco Schoen


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:

 
{code:java}
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{code}
 

I think the change in CAMEL-15781 causes this.

 

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



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to