camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sharma_arun_se <>
Subject Re: Help with Camel JAXB (SMX4 + Camel 2.1.0)
Date Tue, 16 Nov 2010 13:48:09 GMT


I hope somebody have solved this problem, as I can see there are number of
posting for the problem but no real and satisfactory common solution to the

Let me discuss my issue:

I have created jaxb bean as :
<bean id="myJaxb" class="org.apache.camel.model.dataformat.JaxbDataFormat">
  <property name="prettyPrint" value="true"/>
  <property name="contextPath" value=""/>

In my Class, I have create route as :


Now for your concern, I verify you that my jaxb generated classes are in
package: This include ObjectFactory.class.
But there is nothing like jaxb.index inside it.

Why classloader not picking up the class ObjectFactory, although it is there
in package. 

FYI: I am deploying my bundle using feature in ServiceMix 4.3--2.0

Error Log:

Caused by: javax.xml.bind.JAXBException: Unable to create context
- with linked exception:
at javax.xml.bind.ContextFinder.find(
at javax.xml.bind.JAXBContext.newInstance(
at javax.xml.bind.JAXBContext.newInstance(
at javax.xml.bind.JAXBContext.newInstance(
at com.vzb.ram.bind.ns.XmlPoJoUtil.toPoJo(
... 54 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method):1.6.0_18
at java.lang.reflect.Method.invoke(
at javax.xml.bind.ContextFinder.find(
... 58 more
Caused by: javax.xml.bind.JAXBException: ""
doesnt contain ObjectFactory.class or jaxb.index
at com.sun.xml.bind.v2.ContextFactory.createContext(
... 63 more

Thank you,

Arun Kumar (sharma_arun_se)
View this message in context:
Sent from the Camel - Users (activemq) mailing list archive at

View raw message