You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Max Ulanovskiy <mu...@iponweb.com> on 2009/08/31 12:44:42 UTC
XML processing error
<camel:route>
<camel:from ref="fromEmailServer" />
<camel:multicast>
<camel:to uri="bean:mailReader"></camel:to>
<camel:filter>
<camel:xpath>in:header('from') = 'username@domain.ru' |
in:header('subject') = 'some_subj'</camel:xpath>
<camel:pipeline>
<!-- add message into filter -->
<camel:process ref="attachmentsFilter"/>
<!-- filter attachments -->
<camel:to uri="bean:attachmentsFilter?method=filter" />
<camel:doTry>
<camel:to uri="bean:attachmentsProcessor?method=process" />
<camel:doCatch>
<camel:exception>com.mycompany.mail.processor.AttachmentsProcessorException</camel:exception>
<camel:to uri="bean:feedbackManager?method=sendFailReport"/>
</camel:doCatch>
</camel:doTry>
</camel:pipeline>
</camel:filter>
</camel:multicast>
</camel:route>
XML code on top generates parsing exception. Could somebody explain whats my
mistake.
Invalid content was found starting with element 'camel:doTry'. One of
'{"http://activemq.apache.org/camel/schema/spring":aggregator,
"http://activemq.apache.org/camel/schema/spring":bean,
"http://activemq.apache.org/camel/schema/spring":catch,
"http://activemq.apache.org/camel/schema/spring":choice,
"http://activemq.apache.org/camel/schema/spring":when,
"http://activemq.apache.org/camel/schema/spring":otherwise,
"http://activemq.apache.org/camel/schema/spring":convertBodyTo,
"http://activemq.apache.org/camel/schema/spring":delayer,
"http://activemq.apache.org/camel/schema/spring":onException,
"http://activemq.apache.org/camel/schema/spring":filter,
"http://activemq.apache.org/camel/schema/spring":finally,
"http://activemq.apache.org/camel/schema/spring":handleFault,
"http://activemq.apache.org/camel/schema/spring":interceptor,
"http://activemq.apache.org/camel/schema/spring":idempotentConsumer,
"http://activemq.apache.org/camel/schema/spring":intercept,
"http://activemq.apache.org/camel/schema/spring":loadBalance,
"http://activemq.apache.org/camel/schema/spring":marshal,
"http://activemq.apache.org/camel/schema/spring":multicast,
"http://activemq.apache.org/camel/schema/spring":pipeline,
"http://activemq.apache.org/camel/schema/spring":policy,
"http://activemq.apache.org/camel/schema/spring":proceed,
"http://activemq.apache.org/camel/schema/spring":process,
"http://activemq.apache.org/camel/schema/spring":recipientList,
"http://activemq.apache.org/camel/schema/spring":resequencer,
"http://activemq.apache.org/camel/schema/spring":route,
"http://activemq.apache.org/camel/schema/spring":routingSlip,
"http://activemq.apache.org/camel/schema/spring":setBody,
"http://activemq.apache.org/camel/schema/spring":setHeader,
"http://activemq.apache.org/camel/schema/spring":splitter,
"http://activemq.apache.org/camel/schema/spring":thread,
"http://activemq.apache.org/camel/schema/spring":throttler,
"http://activemq.apache.org/camel/schema/spring":throwFault,
"http://activemq.apache.org/camel/schema/spring":to,
"http://activemq.apache.org/camel/schema/spring":transform,
"http://activemq.apache.org/camel/schema/spring":try,
"http://activemq.apache.org/camel/schema/spring":unmarshal}' is expected.
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
at
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
at
org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140)
at
org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:84)
... more
--
View this message in context: http://www.nabble.com/XML-%3Ccamel%3AdoTry%3E-processing-error-tp25221443p25221443.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: XML processing error
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Yeah you are using Camel 1.x schema
"http://activemq.apache.org/camel/schema/spring":bean,
doTry is part of Camel 2.0 which have a schema at:
"http://camel.apache.org/schema/spring":bean,
So you have to use the correct schema for the correct version of Camel
you are using.
On Mon, Aug 31, 2009 at 12:44 PM, Max Ulanovskiy<mu...@iponweb.com> wrote:
>
> <camel:route>
> <camel:from ref="fromEmailServer" />
> <camel:multicast>
> <camel:to uri="bean:mailReader"></camel:to>
> <camel:filter>
> <camel:xpath>in:header('from') = 'username@domain.ru' |
> in:header('subject') = 'some_subj'</camel:xpath>
> <camel:pipeline>
> <!-- add message into filter -->
> <camel:process ref="attachmentsFilter"/>
> <!-- filter attachments -->
> <camel:to uri="bean:attachmentsFilter?method=filter" />
> <camel:doTry>
> <camel:to uri="bean:attachmentsProcessor?method=process" />
> <camel:doCatch>
>
> <camel:exception>com.mycompany.mail.processor.AttachmentsProcessorException</camel:exception>
> <camel:to uri="bean:feedbackManager?method=sendFailReport"/>
> </camel:doCatch>
> </camel:doTry>
> </camel:pipeline>
> </camel:filter>
> </camel:multicast>
> </camel:route>
>
> XML code on top generates parsing exception. Could somebody explain whats my
> mistake.
>
> Invalid content was found starting with element 'camel:doTry'. One of
> '{"http://activemq.apache.org/camel/schema/spring":aggregator,
> "http://activemq.apache.org/camel/schema/spring":bean,
> "http://activemq.apache.org/camel/schema/spring":catch,
> "http://activemq.apache.org/camel/schema/spring":choice,
> "http://activemq.apache.org/camel/schema/spring":when,
> "http://activemq.apache.org/camel/schema/spring":otherwise,
> "http://activemq.apache.org/camel/schema/spring":convertBodyTo,
> "http://activemq.apache.org/camel/schema/spring":delayer,
> "http://activemq.apache.org/camel/schema/spring":onException,
> "http://activemq.apache.org/camel/schema/spring":filter,
> "http://activemq.apache.org/camel/schema/spring":finally,
> "http://activemq.apache.org/camel/schema/spring":handleFault,
> "http://activemq.apache.org/camel/schema/spring":interceptor,
> "http://activemq.apache.org/camel/schema/spring":idempotentConsumer,
> "http://activemq.apache.org/camel/schema/spring":intercept,
> "http://activemq.apache.org/camel/schema/spring":loadBalance,
> "http://activemq.apache.org/camel/schema/spring":marshal,
> "http://activemq.apache.org/camel/schema/spring":multicast,
> "http://activemq.apache.org/camel/schema/spring":pipeline,
> "http://activemq.apache.org/camel/schema/spring":policy,
> "http://activemq.apache.org/camel/schema/spring":proceed,
> "http://activemq.apache.org/camel/schema/spring":process,
> "http://activemq.apache.org/camel/schema/spring":recipientList,
> "http://activemq.apache.org/camel/schema/spring":resequencer,
> "http://activemq.apache.org/camel/schema/spring":route,
> "http://activemq.apache.org/camel/schema/spring":routingSlip,
> "http://activemq.apache.org/camel/schema/spring":setBody,
> "http://activemq.apache.org/camel/schema/spring":setHeader,
> "http://activemq.apache.org/camel/schema/spring":splitter,
> "http://activemq.apache.org/camel/schema/spring":thread,
> "http://activemq.apache.org/camel/schema/spring":throttler,
> "http://activemq.apache.org/camel/schema/spring":throwFault,
> "http://activemq.apache.org/camel/schema/spring":to,
> "http://activemq.apache.org/camel/schema/spring":transform,
> "http://activemq.apache.org/camel/schema/spring":try,
> "http://activemq.apache.org/camel/schema/spring":unmarshal}' is expected.
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
> at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
> at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
> at
> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
> at
> org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
> at
> org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140)
> at
> org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:84)
> ... more
> --
> View this message in context: http://www.nabble.com/XML-%3Ccamel%3AdoTry%3E-processing-error-tp25221443p25221443.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Re: XML processing error
Posted by Max Ulanovskiy <mu...@iponweb.com>.
You was right. Thanks a lot for help.
--
View this message in context: http://www.nabble.com/XML-%3Ccamel%3AdoTry%3E-processing-error-tp25221443p25229044.html
Sent from the Camel - Users mailing list archive at Nabble.com.