No error thrown at Camel route startup if properties cannot be resolved
Issue
A Camel route that uses property placeholder does not raise any errors at start up if some property values can not be resolved.
The logging shows the route starting and stopping immediately thereafter but no errors are raised
13:10:16,911 | INFO | l Console Thread | BlueprintCamelContext | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630262 | Apache Camel 2.17.0.redhat-630262 (CamelContext: camel-jms-localtx-demo) is starting
13:10:16,911 | INFO | l Console Thread | BlueprintCamelContext | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630262 | Tracing is enabled on CamelContext: camel-jms-localtx-demo
13:10:16,911 | INFO | l Console Thread | ManagedManagementStrategy | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630262 | JMX is enabled
13:10:17,004 | INFO | l Console Thread | DefaultRuntimeEndpointRegistry | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630262 | Runtime endpoint registry is in extended mode gathering usage statistics of all incoming and outgoing endpoints (cache limit: 1000)
13:10:17,021 | INFO | l Console Thread | BlueprintCamelContext | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630262 | Apache Camel 2.17.0.redhat-630262 (CamelContext: camel-jms-localtx-demo) is shutting down
13:10:17,027 | INFO | l Console Thread | BlueprintCamelContext | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630262 | Apache Camel 2.17.0.redhat-630262 (CamelContext: camel-jms-localtx-demo) uptime 0.116 seconds
13:10:17,027 | INFO | l Console Thread | BlueprintCamelContext | 232 - org.apache.camel.camel-core - 2.17.0.redhat-630262 | Apache Camel 2.17.0.redhat-630262 (CamelContext: camel-jms-localtx-demo) is shutdown in 0.005 seconds
An example route definition looks like
<camelContext xmlns="http://camel.apache.org/schema/blueprint" id="demo-context" >
<propertyPlaceholder id="properties" location="file:${karaf.home}/etc/demo.properties" />
<route id="test" >
<from id="_from1" uri="{ {from1} }"/>
<to id="_to1" uri="{ {to1} }"/>
</route>
The referenced properties file etc/demo.propertiesis simply empty and does not contain any property definitions.
Note: The property placeholder used in route above actually uses two curly brackets without spaces but the extra space was needed so that the KCS displays this code section correctly.
Environment
- JBoss Fuse 6.3 R3
- Camel runtime
- Using PropertyPlaceholder
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
