I have the following routes in one camel context
<camelContext xmlns="http://camel.apache.org/schema/spring" trace="false">
<propertyPlaceholder id="properties" location="ref:main.props"/>
<route>
<from uri="file:c:/tmp/forum/MainTest?moveFailed=.camelError"/>
<inOut uri="vm:forum.futuredan.camelprop.main:realRoute"/>
</route>
<route>
<from uri="vm:forum.futuredan.camelprop.main:realRoute"/>
<setHeader headerName="forum.futuredan.example">
<simple>${properties:exampleProp}</simple>
</setHeader>
<log message="Example property - ${in.header.forum.futuredan.example}"></log>
<inOut uri="file:c:/tmp/forum/MainOut"/>
</route>
</camelContext>
<osgix:cm-properties id="main.props" persistent-id="forum.futuredan.camelprop.main">
<prop key="exampleProp">PropertyExample</prop>
</osgix:cm-properties>
<context:property-placeholder properties-ref="main.props" />
The route works fine when files are dropped in c:/tmp/forum/MainTest.
I have another Camel context that has the following route:
<route>
<from uri="file:c:/tmp/forum/RemoteTest?moveFailed=.camelError"/>
<inOut uri="vm:forum.futuredan.camelprop.main:realRoute"/>
</route>
The Exchange fails when files are dropped in c:/tmp/forum/RemoteTest.
The error is 'java.lang.IllegalArgumentException: Property with key
exampleProp not found in properties for uri: {{exampleProp}}'
Why is the behavior different between the two?
Is there any workaround?