cancel
Showing results for 
Search instead for 
Did you mean: 
RogerioLSantos
Mission Specialist
Mission Specialist
  • 1,785 Views

JAXB marshal springDSL

 

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?

 

 

 

 

 

Labels (3)
0 Replies
Join the discussion
You must log in to join this conversation.