Hi,
My guess is that you put it in wrong order. You may want to check the schema -
http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
-----
<xs:extension base="tns:abstractCamelContextFactoryBean">
<xs:sequence>
<xs:element minOccurs="0" ref="tns:properties"/>
<xs:element minOccurs="0" ref="tns:propertyPlaceholder"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="package"
type="xs:string"/>
<xs:element minOccurs="0" ref="tns:packageScan"/>
<xs:element minOccurs="0" ref="tns:contextScan"/>
<xs:element minOccurs="0" ref="tns:jmxAgent"/>
<xs:element minOccurs="0" ref="tns:streamCaching"/>
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element ref="tns:template"/>
<xs:element ref="tns:consumerTemplate"/>
<xs:element ref="tns:proxy"/>
<xs:element ref="tns:export"/>
<xs:element ref="tns:errorHandler"/>
</xs:choice>
-----
Thanks,
Tomo
On 12/27/2016 10:48 PM, bdeweer wrote:
Hello,
I try to use the <errorHandler> tag in my XML DSL but it doesn't work.
I think that it's not possible to have both a
<propertyPlaceholder location="classpath:project.properties" />
AND
<errorHandler id="FWKProxyWebServiceErrorHandler" type="DeadLetterChannel"
deadLetterUri="log:dead?level=ERROR"/>
at the same time.
I have this error :
java.lang.RuntimeException: Unable to validate xml
Caused by:
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to
validate xml
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a : Contenu
non valide trouvÚ Ó partir de l'ÚlÚment 'propertyPlaceholder'. L'une des
valeurs '{"http://camel.apa
che.org/schema/blueprint":template,
"http://camel.apache.org/schema/blueprint":consumerTemplate,
"http://camel.apache.org/schema/blueprint":proxy,
"http://camel.apache.org/sch
ema/blueprint":export,
"http://camel.apache.org/schema/blueprint":errorHandler,
"http://camel.apache.org/schema/blueprint":routeBuilder,
"http://camel.apache.org/schema/bluepr
int":routeContextRef,
"http://camel.apache.org/schema/blueprint":restContextRef,
"http://camel.apache.org/schema/blueprint":threadPoolProfile,
"http://camel.apache.org/schema/
blueprint":threadPool, "http://camel.apache.org/schema/blueprint":endpoint,
"http://camel.apache.org/schema/blueprint":dataFormats,
"http://camel.apache.org/schema/blueprint":
redeliveryPolicyProfile,
"http://camel.apache.org/schema/blueprint":onException,
"http://camel.apache.org/schema/blueprint":onCompletion,
"http://camel.apache.org/schema/bluep
rint":intercept, "http://camel.apache.org/schema/blueprint":interceptFrom,
"http://camel.apache.org/schema/blueprint":interceptSendToEndpoint,
"http://camel.apache.org/schema/
blueprint":restConfiguration,
"http://camel.apache.org/schema/blueprint":rest,
"http://camel.apache.org/schema/blueprint":route}' est attendue.
The workarround was to define a bean outside of my camel context.
Like this :
<bean id="properties"
class="org.apache.camel.component.properties.PropertiesComponent">
<property name="location" value="classpath:project.properties"/>
</bean>
In this case it works!
Is it right or may be that I don't use the DSL correctly ?
Thank you
--
View this message in context:
http://camel.465427.n5.nabble.com/Camel-errorHandler-problem-tp5791951.html
Sent from the Camel - Users mailing list archive at Nabble.com.