Community
Participate
Working Groups
One of the ways to bootstrap a MOXy JAXBContext is from a context path: JAXBContext ctx = JAXBContext.newInstance("ctxpath", ClassLoader.getSystemClassLoader(), null); One of the checks that we do is to see if that context path contains a jaxb.index file, containing a list of Classes to bootstrap with. However, if the classes in that list cannot be found, we throw the generic error: "The context path ctxpath contains no ObjectFactory or jaxb.index, no external metadata was found in properties Map, and no sessions.xml was found." However, in this case, a jaxb.index WAS found, but no classes from it could be found.
Since this bug was entered, the error that is thrown in this case (jaxb.index found but can't load one of its classes) has changed. We now throw "A descriptor for class typelevelns.Person was not found in the project. For JAXB, if the JAXBContext was bootstrapped using TypeMappingInfo[] you must call a marshal method that accepts TypeMappingInfo as an input parameter." This is fine, because at least it is telling the user which class it was unable to load. Closing this.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink