Make sure the order where you put <template> is correct. You can validate the XML with the blueprint schema. Most moderns IDEs can do this for you. Eg in IDEA I just right click -> validate
On Sun, Aug 18, 2013 at 1:20 PM, Maurice <[email protected]> wrote: > Using camel 2.11.0, Karaf 2.3.1. with blueprint. > I am trying to send multiple messages using a custom processor to a > tx-transacted jms endpoint with a ProducerTemplate according to l > <http://camel.apache.org/how-do-i-write-a-custom-processor-which-sends-multiple-messages.html> > . > XML: > <template id="stackProducerTemplate" > defaultEndpoint="amq-tx:queue:stackQueue?messageConverter=#byteStreamMessageConverter" > camelContextId="camelContext"/> > (the template is declared within the camelcontext camelContext, but with our > without it does not matter) > The error i get from blueprint on creation of the Template: > > org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to > validate xml > > Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid > content was found starting with element 'template'. One of > '{"http://camel.apache.org/schema/blueprint":route}' is expected. > > Programmatically this works perfect, injecting the camel context in the > processor and instantiating the template from it. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Producer-template-and-spring-xml-defaultendpoint-error-tp5737471.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: [email protected] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
