You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Nick Heudecker <nh...@gmail.com> on 2009/08/04 21:14:24 UTC

Cannot locate BeanDefinitionParser for element [template]

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

Re: Cannot locate BeanDefinitionParser for element [template]

Posted by Willem Jiang <wi...@gmail.com>.
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<nh...@gmail.com> 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
>>
> 
> 
> 


Re: Cannot locate BeanDefinitionParser for element [template]

Posted by Nick Heudecker <nh...@gmail.com>.
That did it. Thanks for the clarification.


On Tue, Aug 4, 2009 at 12:17 PM, Claus Ibsen <cl...@gmail.com> wrote:

> The XSD is auto generated based and thus its not hand written and that
> can leads to a few issues such as forcing stuff to be inside
> <camelContext> as its what you do, configure a camel instance.
>
>
>
> On Tue, Aug 4, 2009 at 9:16 PM, Claus Ibsen<cl...@gmail.com> 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<nh...@gmail.com>
> 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
> >>
> >
> >
> >
> > --
> > Claus Ibsen
> > Apache Camel Committer
> >
> > Open Source Integration: http://fusesource.com
> > Blog: http://davsclaus.blogspot.com/
> > Twitter: http://twitter.com/davsclaus
> >
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>



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

Re: Cannot locate BeanDefinitionParser for element [template]

Posted by Claus Ibsen <cl...@gmail.com>.
The XSD is auto generated based and thus its not hand written and that
can leads to a few issues such as forcing stuff to be inside
<camelContext> as its what you do, configure a camel instance.



On Tue, Aug 4, 2009 at 9:16 PM, Claus Ibsen<cl...@gmail.com> 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<nh...@gmail.com> 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
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: Cannot locate BeanDefinitionParser for element [template]

Posted by Claus Ibsen <cl...@gmail.com>.
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<nh...@gmail.com> 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
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus