JAXBException: “package” doesnt contain ObjectFactory.class or jaxb.index

前提是你 提交于 2019-12-05 11:04:40
lexicore

Provider com.sun.xml.internal.bind.v2.ContextFactory could not be instantiated - seems like you're not using MOXy but the built-in JAXB RI.

Please check the following post by Blaise:

Specifying EclipseLink MOXy as Your JAXB Provider

See also the following question:

Does MOXy need anything special when using with schema-derived classes?

avi.elkharrat

The answer provided by Lexicore in his comment did it for me!

I have setted the two packages as shown in Blaise's answer:

JAXBContext jc = JAXBContext.newInstance("com.example.pkg1:org.example.pkg2");

And that did it!

Thx man

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!