Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.7.0
-
None
-
Unknown
-
Regression
Description
We tried updating camel-spring-boot from version 3.6.0 to 3.7.0.
Components using camel-caffeine-starter now fail to start because a property was not found:
2021-01-04 18:02:39.155 ERROR 18328 --- [ main] o.s.boot.SpringApplication : Application run failed org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: >>> To[http://{{http.username}}:{{http.password}}@{{http.host}}:{{http.port}}] <<< in route: Route(route1)[From[seda:in] -> [To[http://{{http.username}}:... because of Failed to resolve endpoint: http://{{http.username}}:xxxxxx@{{http.host}}:{{http.port}} due to: Property with key [http.username] not found in properties from text: http://{{http.username}}:{{http.password}}@{{http.host}}:{{http.port}} at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:229) ~[camel-core-reifier-3.7.0.jar:3.7.0] at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:73) ~[camel-core-reifier-3.7.0.jar:3.7.0] at org.apache.camel.impl.DefaultModelReifierFactory.createRoute(DefaultModelReifierFactory.java:49) ~[camel-core-engine-3.7.0.jar:3.7.0] at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:599) ~[camel-core-engine-3.7.0.jar:3.7.0] at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:557) ~[camel-core-engine-3.7.0.jar:3.7.0] at org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2642) ~[camel-base-engine-3.7.0.jar:3.7.0] at org.apache.camel.support.service.BaseService.init(BaseService.java:83) ~[camel-api-3.7.0.jar:3.7.0] at org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2414) ~[camel-base-engine-3.7.0.jar:3.7.0] at org.apache.camel.support.service.BaseService.start(BaseService.java:111) ~[camel-api-3.7.0.jar:3.7.0] at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2431) ~[camel-base-engine-3.7.0.jar:3.7.0] at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:130) ~[camel-spring-3.7.0.jar:3.7.0] at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:167) ~[camel-spring-3.7.0.jar:3.7.0] at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.3.2.jar:5.3.2] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.3.2.jar:5.3.2] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.3.2.jar:5.3.2] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:426) ~[spring-context-5.3.2.jar:5.3.2] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:383) ~[spring-context-5.3.2.jar:5.3.2] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:943) ~[spring-context-5.3.2.jar:5.3.2] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591) ~[spring-context-5.3.2.jar:5.3.2] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144) ~[spring-boot-2.4.1.jar:2.4.1] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767) ~[spring-boot-2.4.1.jar:2.4.1] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) ~[spring-boot-2.4.1.jar:2.4.1] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426) ~[spring-boot-2.4.1.jar:2.4.1] at org.springframework.boot.SpringApplication.run(SpringApplication.java:326) ~[spring-boot-2.4.1.jar:2.4.1] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1309) ~[spring-boot-2.4.1.jar:2.4.1] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1298) ~[spring-boot-2.4.1.jar:2.4.1] at test.App.main(App.java:10) ~[classes/:na] Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: http://{{http.username}}:xxxxxx@{{http.host}}:{{http.port}} due to: Property with key [http.username] not found in properties from text: http://{{http.username}}:{{http.password}}@{{http.host}}:{{http.port}} at org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:835) ~[camel-base-engine-3.7.0.jar:3.7.0] at org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:793) ~[camel-base-engine-3.7.0.jar:3.7.0] at org.apache.camel.support.CamelContextHelper.resolveEndpoint(CamelContextHelper.java:123) ~[camel-support-3.7.0.jar:3.7.0] at org.apache.camel.reifier.SendReifier.resolveEndpoint(SendReifier.java:43) ~[camel-core-reifier-3.7.0.jar:3.7.0] at org.apache.camel.reifier.SendReifier.createProcessor(SendReifier.java:36) ~[camel-core-reifier-3.7.0.jar:3.7.0] at org.apache.camel.reifier.ProcessorReifier.makeProcessor(ProcessorReifier.java:829) ~[camel-core-reifier-3.7.0.jar:3.7.0] at org.apache.camel.reifier.ProcessorReifier.addRoutes(ProcessorReifier.java:575) ~[camel-core-reifier-3.7.0.jar:3.7.0] at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:227) ~[camel-core-reifier-3.7.0.jar:3.7.0] ... 26 common frames omitted Caused by: java.lang.IllegalArgumentException: Property with key [http.username] not found in properties from text: http://{{http.username}}:{{http.password}}@{{http.host}}:{{http.port}} at org.apache.camel.component.properties.DefaultPropertiesParser$ParsingContext.getPropertyValue(DefaultPropertiesParser.java:250) ~[camel-base-3.7.0.jar:3.7.0] at org.apache.camel.component.properties.DefaultPropertiesParser$ParsingContext.readProperty(DefaultPropertiesParser.java:146) ~[camel-base-3.7.0.jar:3.7.0] at org.apache.camel.component.properties.DefaultPropertiesParser$ParsingContext.doParse(DefaultPropertiesParser.java:104) ~[camel-base-3.7.0.jar:3.7.0] at org.apache.camel.component.properties.DefaultPropertiesParser$ParsingContext.parse(DefaultPropertiesParser.java:88) ~[camel-base-3.7.0.jar:3.7.0] at org.apache.camel.component.properties.DefaultPropertiesParser.parseUri(DefaultPropertiesParser.java:61) ~[camel-base-3.7.0.jar:3.7.0] at org.apache.camel.component.properties.PropertiesComponent.parseUri(PropertiesComponent.java:256) ~[camel-base-3.7.0.jar:3.7.0] at org.apache.camel.component.properties.PropertiesComponent.parseUri(PropertiesComponent.java:155) ~[camel-base-3.7.0.jar:3.7.0] at org.apache.camel.impl.engine.AbstractCamelContext.resolvePropertyPlaceholders(AbstractCamelContext.java:1715) ~[camel-base-engine-3.7.0.jar:3.7.0] at org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:833) ~[camel-base-engine-3.7.0.jar:3.7.0] ... 33 common frames omitted
We are using Spring Boot 2.4.1.
I have created a simplified example, which can be run as a unit test or as a spring boot app:
https://github.com/PascalSchumacher/CamelSpringBootPropertyNotFoundWhenUsingCaffeineStarter
The example does not use camel-caffeine, but our real components do.
When camel-caffeine-starter is removed from the pom, everything works fine. Our Camel Spring Boot components without camel-caffeine-starter work fine.