How to use multiple properties files as user can't access property files that are placed in {fuse-home}/etc ?
Issue
- Why user can't access property files that are placed in
{fuse-home}/etc
directory? - User added these files...
{fuse-home}/etc/x-y-z-a.cfg
{fuse-home}/etc/x-y-z-b.cfg
- User gets this error trying to access the properties in the
camel
context. - Attribute 'location' is not allowed to appear in element
cm:property-placeholder
. With below config...
<camelContext id="id1" xmlns="http://camel.apache.org/schema/blueprint">
<package>xx.yy.zz.camel.routes</package>
</camelContext>
<cm:property-placeholder id="default" persistent-id="x-y-z" placeholder-prefix="${" placeholder-suffix="}" >
<cm:default-properties>
<cm:property name="key1" value="value1"/>
<cm:property name="key2" value="value2"/>
</cm:default-properties>
</cm:property-placeholder>
<cm:property-placeholder id="id2" persistent-id="a-b-c"
location="file:${karaf.home}/etc/a-b-c.cfg" placeholder-prefix="$(" placeholder-suffix=")" />
<cm:property-placeholder id="id3" persistent-id="m-n-l"
location="file:${karaf.home}/etc/m-n-l.cfg" placeholder-prefix="$[" placeholder-suffix="]" />
- User is getting below error
- Invalid content was found starting with element
propertyPlaceholder
, with below config.
<camelContext id="contextId4" xmlns="http://camel.apache.org/schema/blueprint">
<package>xxx.yyy.zzz</package>
<propertyPlaceholder id="id1" location="blueprint:aa-bb"/>
<propertyPlaceholder id="id2" location="blueprint:xx-yy"/>
</camelContext>
<cm:property-placeholder id="id1" persistent-id="aa-bb-cc-xx" placeholder-prefix="$(" placeholder-suffix=")" />
<cm:property-placeholder id="id2" persistent-id="aa-bb-cc-yy" placeholder-prefix="$[" placeholder-suffix="]" />
<cm:property-placeholder id="id3" persistent-id="aa-bb-cc-zz">
<cm:default-properties>
<cm:property name="key1" value="value1"/>
<cm:property name="key2" value="value2"/>
</cm:default-properties>
</cm:property-placeholder>
-
And when user try this config, only the default properties are being discovered.
<camelContext id="id1" xmlns="http://camel.apache.org/schema/blueprint"> <package>xxx.yyy.zzz</package> </camelContext> <cm:property-placeholder id="id1" persistent-id="aa-bb-cc-xx" placeholder-prefix="$(" placeholder-suffix=")" /> <cm:property-placeholder id="id2" persistent-id="aa-bb-cc-yy" placeholder-prefix="$[" placeholder-suffix="]" /> <cm:property-placeholder id="id3" persistent-id="aa-bb-cc-zz"> <cm:default-properties> <cm:property name="key1" value="value1"/> </cm:default-properties> </cm:property-placeholder>
Environment
- Red Hat JBoss Fuse
- 6.2.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.