On Wed, Mar 10, 2010 at 12:46 PM, ankelee <andreasasm...@gmail.com> wrote:
>
> http://camel.apache.org/jaxb.html
>
> That example doesnt work, looking at the API it doesn't even take a String
> in the constructor?
>
> DataFormat jaxb = new JaxbDataFormat("com.acme.model");
> from("activemq:My.Queue").unmarshal(jaxb).to("mqseries:Another.Queue");
>
> I tried this:
>
> JaxbDataFormat jaxb = new JaxbDataFormat();
> jaxb.setContextPath("package.with.annotated.java.classes");
>
> .to("xslt://file:dir/some.xsl")
> .unmarshal(jaxb)
> .marshal(jaxb)
> .to("file://dir");
>
> ...doesn't work:
>
> SEVERE: Failed delivery for exchangeId:
> 06fc3c4f-3f8a-4322-9c07-416e3e25b464. Exhausted after delivery attempt: 1
> caught: java.io.IOException
> --

Look at the caught exception. Its an IOException which could be
something like file not found etc.
You have to dig into the stacktrace to see the real problem.

And check in camel-jaxb in the src/test/java for unit tests to see how
to use it.

> View this message in context: 
> http://old.nabble.com/How-to-use-JAXB-and-Java-DSL-tp27848546p27848546.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to