Do you always need an ObjectFactory class when using JAXB?
Without it I get this exception:
javax.xml.bind.JAXBException: \"com.a.b.c\"
I was using Spring and I just had to change
Jaxb2Marshaller mlr = new Jaxb2Marshaller(); mlr.setContextPaths("","");
to
Jaxb2Marshaller mlr = new Jaxb2Marshaller(); mlr.setPackagesToScan("","");