FAQ
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.

Search Discussions

  • Christian Müller at Feb 21, 2012 at 10:25 pm
    Did you add camel-jaxb as dependency?

    Christian
    On Tue, Feb 21, 2012 at 9:49 PM, Samruben 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.
  • Samruben at Feb 22, 2012 at 5:04 am
    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.
  • Christian Müller at Feb 22, 2012 at 9:52 pm
    I did not mean jaxb.jar. I talk about camel-jaxb.jar.

    Christian
    On Wed, Feb 22, 2012 at 6:03 AM, Samruben 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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedFeb 21, '12 at 8:50p
activeFeb 22, '12 at 9:52p
posts4
users2
websitecamel.apache.org

2 users in discussion

Christian Müller: 2 posts Samruben: 2 posts

People

Translate

site design / logo © 2023 Grokbase