You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Samruben <ra...@gmail.com> on 2012/02/21 21:49:41 UTC
Exception while using jaxb inside xml
Hi I have tested a sample with simple router by loading it by xml. but when i
include jaxb and camelcontext in it, its not getting loaded. It throws
exception.
xml router:
<camelContext id="camel" trace="true"
xmlns="http://camel.apache.org/schema/spring">
<dataFormats>
<jaxb id="jaxb" contextPath="camelinaction"/>
</dataFormats>
<route>
<from uri="direct:order"/>
<marshal ref="jaxb"/>
<to uri="jms:queue:order.queue"/>
</route>
</camelContext>
Exception in thread "main" org.apache.camel.CamelExecutionException:
Exception occurred during execution on the exchange: Exchange[Message: <?xml
version="1.0" encoding="UTF-8" standalone="yes"?>
<purchaseOrder amount="1.0" price="4995.0" name="Camel in Action"/>
]
at
org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1212)
--
View this message in context: http://camel.465427.n5.nabble.com/Exception-while-using-jaxb-inside-xml-tp5503335p5503335.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Exception while using jaxb inside xml
Posted by Christian Müller <ch...@gmail.com>.
I did not mean jaxb.jar. I talk about camel-jaxb.jar.
Christian
On Wed, Feb 22, 2012 at 6:03 AM, Samruben <ra...@gmail.com> wrote:
> Yes i added jaxb jar
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Exception-while-using-jaxb-inside-xml-tp5503335p5504128.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
Re: Exception while using jaxb inside xml
Posted by Samruben <ra...@gmail.com>.
Yes i added jaxb jar
--
View this message in context: http://camel.465427.n5.nabble.com/Exception-while-using-jaxb-inside-xml-tp5503335p5504128.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Exception while using jaxb inside xml
Posted by Christian Müller <ch...@gmail.com>.
Did you add camel-jaxb as dependency?
Christian
On Tue, Feb 21, 2012 at 9:49 PM, Samruben <ra...@gmail.com> wrote:
> Hi I have tested a sample with simple router by loading it by xml. but
> when i
> include jaxb and camelcontext in it, its not getting loaded. It throws
> exception.
>
> xml router:
>
> <camelContext id="camel" trace="true"
> xmlns="http://camel.apache.org/schema/spring">
>
> <dataFormats>
> <jaxb id="jaxb" contextPath="camelinaction"/>
> </dataFormats>
>
> <route>
> <from uri="direct:order"/>
> <marshal ref="jaxb"/>
> <to uri="jms:queue:order.queue"/>
> </route>
>
> </camelContext>
>
>
>
> Exception in thread "main" org.apache.camel.CamelExecutionException:
> Exception occurred during execution on the exchange: Exchange[Message:
> <?xml
> version="1.0" encoding="UTF-8" standalone="yes"?>
> <purchaseOrder amount="1.0" price="4995.0" name="Camel in Action"/>
> ]
> at
>
> org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1212)
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Exception-while-using-jaxb-inside-xml-tp5503335p5503335.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>