Yes, define the <camel:template> outside the <camel:camelContext> is problematic. If you have more than two <camel:camelContext> in the same Spring configuration file, the outside template can't know which camelContext it should take.

So I removed the template BeanDefinitionParser registration code recently, and you can only set the template inside the camelContext.

Willem

Claus Ibsen wrote:
Hi

Put <camel:template/> inside the <camel:camelContext> tag, that is
they way its supposed to be configured.


On Tue, Aug 4, 2009 at 9:14 PM, Nick Heudecker<[email protected]> wrote:
Possibly a follow-on to
http://www.nabble.com/Cannot-Autowire-consumerTemplate-for-client-test-td24781739.html,
I'm getting the following exception when I try to start my application:

2009-08-04 12:06:36.728::WARN:  Nested in
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Failed to import bean definitions from URL location
[classpath:applicationContext-camel.xml]
Offending resource: class path resource [applicationContext.xml]; nested
exception is
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Cannot locate BeanDefinitionParser for element
[template]
Offending resource: class path resource [applicationContext-camel.xml]:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Cannot locate BeanDefinitionParser for element
[template]
Offending resource: class path resource [applicationContext-camel.xml]

Here's the bit of config it's complaining about:

   <camel:camelContext id="camel"/>

   <camel:template id="camelTemplate"/>

I'm running off of the latest 2.0-SNAPSHOT.

Thanks in advance for any help.


--
Nick Heudecker
Professional Wicket Training & Consulting
http://www.systemmobile.com





Reply via email to