-
1. Re: How do I make Blueprint resolve placeholders from multiple files?
ffang Feb 18, 2013 2:21 AM (in response to constv)Hi,
Please see the related discussion[1]
http://fusesource.com/forums/thread.jspa?messageID=15104
Freeman
-
2. Re: How do I make Blueprint resolve placeholders from multiple files?
constv Feb 19, 2013 12:01 PM (in response to ffang)Freeman, thanks, but I think this is exactly what I have been doing, and I couldn't get it to work. Please take a look at my code example above. Am I using the value for the location property correctly, assuming my properties file is in etc/conf directory? It is still not clear to me how to combine the "standard" <cm:property-placeholder> usage with <ext:property-placeholder /> so that the properties are resolved from both the .cfg file and some other regular .properties file(s).
When I define both placeholder resolvers - as shown in my example above - I always get the following error during the bundle initialization:
2013-02-19 11:33:16,924 | ERROR | rint Extender: 3 | BlueprintContainerImpl | 9 - org.apache.aries.blueprint - 0.3.2 | Unable to start blueprint container for bundle com.mycompany.myapp.myservice org.osgi.service.blueprint.container.ComponentDefinitionException: Multiple placeholders with the same prefix and suffix are not allowed at org.apache.aries.blueprint.ext.PlaceholdersUtils.validatePlaceholder(PlaceholdersUtils.java:48)[9:org.apache.aries.blueprint:0.3.2] at org.apache.aries.blueprint.ext.ExtNamespaceHandler.parsePropertyPlaceholder(ExtNamespaceHandler.java:245)[9:org.apache.aries.blueprint:0.3.2] at org.apache.aries.blueprint.ext.ExtNamespaceHandler.parse(ExtNamespaceHandler.java:113)[9:org.apache.aries.blueprint:0.3.2] at org.apache.aries.blueprint.container.Parser.parseCustomElement(Parser.java:1248)[9:org.apache.aries.blueprint:0.3.2] at org.apache.aries.blueprint.container.Parser.loadComponents(Parser.java:337)[9:org.apache.aries.blueprint:0.3.2] at org.apache.aries.blueprint.container.Parser.populate(Parser.java:277)[9:org.apache.aries.blueprint:0.3.2] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:283)[9:org.apache.aries.blueprint:0.3.2] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:230)[9:org.apache.aries.blueprint:0.3.2]
Note that it happens even when I define distinct prefix and suffix for the ext placeholders, e.g. "$(" and ")" - parenthesis instead of curly brackets.