You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by swwyatt <st...@sungard.com> on 2012/02/16 17:04:48 UTC

Property placeholder

I am attempting to use property placeholders as described here:
http://camel.apache.org/properties.html

I am using camel 2.8.1.

I am getting this error on deployment:

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute
'prop:poolSize' is not allowed to appear in element 'threadPoolProfile'.

Does anyone know why I get this error? Below is my xml dsl.

<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jee="http://www.springframework.org/schema/jee"
	xmlns:util="http://www.springframework.org/schema/util"
xmlns:context="http://www.springframework.org/schema/context"
	xmlns:camel="http://camel.apache.org/schema/spring"
	xmlns:prop="http://camel.apache.org/schema/placeholder"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
		http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee.xsd
		http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
		http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">

	<camelContext id="my-camel-context"
xmlns="http://camel.apache.org/schema/spring">
	
		<propertyPlaceholder id="properties" location="classpath:my.properties"/>

		<threadPoolProfile id="myDefaultProfile"
			defaultProfile="true"
			prop:poolSize="POOL_SIZE"
			prop:keepAliveTime="KEEP_ALIVE_TIME"
			prop:maxPoolSize="MAX_POOL_SIZE"
			prop:maxQueueSize="MAX_QUEUE_SIZE"
			prop:rejectedPolicy="REJECTED_POLICY" />

	</camelContext>

</beans>

--
View this message in context: http://camel.465427.n5.nabble.com/Property-placeholder-tp5489904p5489904.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Property placeholder

Posted by swwyatt <st...@sungard.com>.
Ok. Thanks for the help!

--
View this message in context: http://camel.465427.n5.nabble.com/Property-placeholder-tp5489904p5490103.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Property placeholder

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Feb 16, 2012 at 5:49 PM, swwyatt <st...@sungard.com> wrote:
> Seems to work for all the attributes except rejectedPolicy. I'm getting this
> error now:
>
> Caused by: org.xml.sax.SAXParseException: cvc-enumeration-valid: Value
> 'REJECTED_POLICY' is not facet-valid with respect to enumeration '[Abort,
> CallerRuns, DiscardOldest, Discard]'. It must be a value from the
> enumeration.
>

Yeah that option you cannot use a property placeholder. You have to
use one of the values reported above.

>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Property-placeholder-tp5489904p5490031.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Property placeholder

Posted by swwyatt <st...@sungard.com>.
Seems to work for all the attributes except rejectedPolicy. I'm getting this
error now:

Caused by: org.xml.sax.SAXParseException: cvc-enumeration-valid: Value
'REJECTED_POLICY' is not facet-valid with respect to enumeration '[Abort,
CallerRuns, DiscardOldest, Discard]'. It must be a value from the
enumeration.


--
View this message in context: http://camel.465427.n5.nabble.com/Property-placeholder-tp5489904p5490031.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Property placeholder

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Remove the prop: prefix from the attributes.


On Thu, Feb 16, 2012 at 5:04 PM, swwyatt <st...@sungard.com> wrote:
> I am attempting to use property placeholders as described here:
> http://camel.apache.org/properties.html
>
> I am using camel 2.8.1.
>
> I am getting this error on deployment:
>
> Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute
> 'prop:poolSize' is not allowed to appear in element 'threadPoolProfile'.
>
> Does anyone know why I get this error? Below is my xml dsl.
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:jee="http://www.springframework.org/schema/jee"
>        xmlns:util="http://www.springframework.org/schema/util"
> xmlns:context="http://www.springframework.org/schema/context"
>        xmlns:camel="http://camel.apache.org/schema/spring"
>        xmlns:prop="http://camel.apache.org/schema/placeholder"
>        xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
>                http://www.springframework.org/schema/context
> http://www.springframework.org/schema/context/spring-context.xsd
>                http://www.springframework.org/schema/jee
> http://www.springframework.org/schema/jee/spring-jee.xsd
>                http://www.springframework.org/schema/util
> http://www.springframework.org/schema/util/spring-util.xsd
>                http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring.xsd">
>
>        <camelContext id="my-camel-context"
> xmlns="http://camel.apache.org/schema/spring">
>
>                <propertyPlaceholder id="properties" location="classpath:my.properties"/>
>
>                <threadPoolProfile id="myDefaultProfile"
>                        defaultProfile="true"
>                        prop:poolSize="POOL_SIZE"
>                        prop:keepAliveTime="KEEP_ALIVE_TIME"
>                        prop:maxPoolSize="MAX_POOL_SIZE"
>                        prop:maxQueueSize="MAX_QUEUE_SIZE"
>                        prop:rejectedPolicy="REJECTED_POLICY" />
>
>        </camelContext>
>
> </beans>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Property-placeholder-tp5489904p5489904.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/