Trying to use this new feature using 2.3.0-SNAPSHOT.

<camelContext xmlns="http://camel.apache.org/schema/spring";>
        <propertyPlaceholder id="properties"
location="com/mycompany/myprop.properties"/>
.....

Error:

org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Failed to import bean definitions from relative
location [default-camel.xml]
Offending resource: class path resource [isuite-client-context.xml]; nested
exception is
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
35 in XML document from class path resource [default-camel.xml] is invalid;
nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a:
Invalid content starting with element 'propertyPlaceholder'. One of
'{"http://camel.apache.org/schema/spring":endpoint,
"http://camel.apache.org/schema/spring":dataFormats,
"http://camel.apache.org/schema/spring":onException,
"http://camel.apache.org/schema/spring":onCompletion,
"http://camel.apache.org/schema/spring":intercept,
"http://camel.apache.org/schema/spring":interceptFrom,
"http://camel.apache.org/schema/spring":interceptSendToEndpoint,
"http://camel.apache.org/schema/spring":route}' is expected.
        at
org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
        at
org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
        at
org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76)

What could be the problem?

On another note, the site http://camel.apache.org/properties.html is
confusing.
"Camel now provides a new PropertiesComponent in camel-core which allows you
to use property placeholders when defining Camel Endpoint URIs. 
This works much like you would do if using Spring's <property-placeholder>
tag. However Spring have a limitation which prevents 3rd party frameworks to
leverage Spring property placeholders to the fullest."

And then it links to a trick to show how to use properties as endpoints.

So can I use {{prop.prop}} as URI or not?
-- 
View this message in context: 
http://old.nabble.com/%3CpropertyPlaceholder%3E-not-working.-tp28609051p28609051.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to