How to access properties file values in blueprint outside camel context from outside server location ?

Solution Verified - Updated -

Issue

  • We have a requirement to access values from a property file to be used in our blue print.
    These values should be used outside camel-context () and the property file should be out side the server file system

  • We are getting the below while we are using the Bluepint ext namespace, http://aries.apache.org/modules/blueprintnoosgi.html.

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'location'. One of '{"http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0":default-properties, "http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0":location}'; is expected.

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
 xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
  xmlns:enc="http://karaf.apache.org/xmlns/jasypt/v1.0.0">
   <ext:property-placeholder>
    <location>file:etc/ldap.properties</location>
   </ext:property-placeholder>
</blueprint>
  • Which is the dependency that includes this schema from which the sub-elements can be fetched, used and validated ? We are not able to find it ?

  • We are also getting the below error,

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:49)[9:org.apache.aries.blueprint.core:1.0.1.redhat-610379]

Environment

  • Red Hat JBoss Fuse
    • 6.x
  • Apache Aries/Blueprint
  • Apache Camel

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content