josephearl opened a new issue, #3879:
URL: https://github.com/apache/camel-quarkus/issues/3879

   I have an application using Quarkus Camel ActiveMQ and in the prod profile 
some properties are set to environment variables, e.g.
   
   ```yaml
   %prod:
     my-prop: ${MY_PROP}
   ```
   
   These env vars are not set when running locally/for tests, instead the value 
for `my-prop` is provided automatically by a dev service. This used to work 
fine with 2.9.2.Final.
   
   However after attempting to upgrade to 2.10.0 and run tests I get an error:
   
   ```
   Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to 
resolve endpoint: {{some-input.uri}} due to: SRCFG00011: Could not expand value 
MY_PROP in property %prod.my-prop
        at 
org.apache.camel.support.EndpointHelper.resolveEndpointUriPropertyPlaceholders(EndpointHelper.java:86)
           ...
   Caused by: java.util.NoSuchElementException: SRCFG00011: Could not expand 
value MY_PROP in property %prod.my-prop
        at 
io.smallrye.config.ExpressionConfigSourceInterceptor$1.accept(ExpressionConfigSourceInterceptor.java:68)
        at 
io.smallrye.config.ExpressionConfigSourceInterceptor$1.accept(ExpressionConfigSourceInterceptor.java:58)
        at 
io.smallrye.common.expression.ExpressionNode.emit(ExpressionNode.java:22)
        at 
io.smallrye.common.expression.Expression.evaluateException(Expression.java:56)
        at io.smallrye.common.expression.Expression.evaluate(Expression.java:70)
        at 
io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:58)
        at 
io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:38)
        at 
io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
        at 
io.smallrye.config.FallbackConfigSourceInterceptor.getValue(FallbackConfigSourceInterceptor.java:24)
        at 
io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
        at 
io.smallrye.config.PropertyNamesConfigSourceInterceptor.getValue(PropertyNamesConfigSourceInterceptor.java:17)
        at 
io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
        at 
io.smallrye.config.SmallRyeConfig.getConfigValue(SmallRyeConfig.java:307)
        at io.smallrye.config.SmallRyeConfig.getValue(SmallRyeConfig.java:225)
        at 
io.smallrye.config.SmallRyeConfig.getOptionalValue(SmallRyeConfig.java:324)
        at 
org.apache.camel.component.microprofile.config.CamelMicroProfilePropertiesSource.loadProperties(CamelMicroProfilePropertiesSource.java:50)
        at 
org.apache.camel.component.properties.DefaultPropertiesLookup.doLookup(DefaultPropertiesLookup.java:89)
        at 
org.apache.camel.component.properties.DefaultPropertiesLookup.lookup(DefaultPropertiesLookup.java:43)
        at 
org.apache.camel.component.properties.DefaultPropertiesParser$ParsingContext.doGetPropertyValue(DefaultPropertiesParser.java:348)
        at 
org.apache.camel.component.properties.DefaultPropertiesParser$ParsingContext.getPropertyValue(DefaultPropertiesParser.java:275)
        at 
org.apache.camel.component.properties.DefaultPropertiesParser$ParsingContext.readProperty(DefaultPropertiesParser.java:177)
        at 
org.apache.camel.component.properties.DefaultPropertiesParser$ParsingContext.doParse(DefaultPropertiesParser.java:119)
        at 
org.apache.camel.component.properties.DefaultPropertiesParser$ParsingContext.parse(DefaultPropertiesParser.java:103)
        at 
org.apache.camel.component.properties.DefaultPropertiesParser.parseUri(DefaultPropertiesParser.java:68)
        at 
org.apache.camel.component.properties.PropertiesComponent.parseUri(PropertiesComponent.java:312)
        at 
org.apache.camel.component.properties.PropertiesComponent.parseUri(PropertiesComponent.java:168)
        at 
org.apache.camel.impl.engine.AbstractCamelContext.resolvePropertyPlaceholders(AbstractCamelContext.java:1881)
        at 
org.apache.camel.support.EndpointHelper.resolveEndpointUriPropertyPlaceholders(EndpointHelper.java:74)
        ... 167 more
   ```
   
   It looks like it is trying to resolve the values for the prod profile but it 
should not be doing this because I am using the test profile


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to