Hi I guess you should adjust your XML namespace as you make use of Blueprint and not Spring, so instead of:
<camelContext xmlns="http://camel.apache.org/schema/spring"> Try it with: <camelContext xmlns="http://camel.apache.org/schema/blueprint"> Babak Maurice 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 > how-do-i-write-a-custom-processor-which-sends-multiple-messages > <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-tp5737471p5737473.html Sent from the Camel - Users mailing list archive at Nabble.com.
