I tried to execute a lab to unmarshal xml files to Java object using spring DSL with jaxb (Fuse 7), however occurs this message when I execute the camel route
Caused by: javax.xml.bind.JAXBException: "com.redhat.training.model" doesnt contain ObjectFactory.class or jaxb.index
In the course material, is wrote to create a route using the tags <dataFormats>
<bean id="xmlProcessor" class="com.redhat.training.processor.XmlProcessor" /> <camelContext id="camelContext-5934cd73-2041-4b43-aa3c-52f4f62aaeef" trace="false" xmlns="http://camel.apache.org/schema/spring"> <dataFormats> <jaxb id="jaxb" contextPath="com.redhat.training.model" ></jaxb> </dataFormats> <route id="_route1"> <from id="_from1" uri="file:files/xml"/> <unmarshal ref="jaxb"/> <to uri="bean:xmlProcessor" /> </route> </camelContext> </beans>
I don' t understand the reason for this error because of I made an annotated class, as described in JB421 and put the class in the package com.redhat.training.model.
Does somebody already have this problem?
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.