-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XMLBindingContextFactory in EclipseLink 4 causes GlassFish to find 2 JAXBContextFactory providers #1380
Comments
@lukasj the cause seems to be because of this change. In In 4.0.0 Class<?> ctxFactory = (Class<?>) ServiceLoaderUtil.lookupUsingOSGiServiceLoader(
JAXBContext.JAXB_CONTEXT_FACTORY, logger); Where JAXB_CONTEXT_FACTORY = "jakarta.xml.bind.JAXBContextFactory" In 3.0.1 Class ctxFactory = (Class) ServiceLoaderUtil.lookupUsingOSGiServiceLoader(
"jakarta.xml.bind.JAXBContext", logger); For the Any ideas how to resolve this in GF? |
Other parts of GF seem to dislike the EclipseLink JAXB provider as well, e.g.
Maybe it's better after all to disable |
this has nothing to do with MOXy in the first place - there is no evidence of MOXy code being involved in provided stacktraces, all they say is that {jersey, metro} do rely on a specific implementation of XML binding. This could have come through an overly eager adoption of the API which has announced breaking changes through the change in its major version number by GF without giving those project time to adopt this particular change or it could have been just a development time issue for which some temporary fix has never been reverted. In any case, once jakartaee/jaxb-api#275 gets to public binary, things should start working as I would expect them to: -by default, arbitrary version of the xml binding implementation is used by the XML Binding API |
XMLBindingContextFactory
, which I think is new in EclipseLink 4, causesjakarta.xml.bind.ServiceLoaderUtil.lookupUsingOSGiServiceLoader(String, Logger)
to find 2 providers forjakarta.xml.bind.JAXBContextFactory
; this new one and the existing V2 ONE.As Jersey instantiates its WADL Feature which needs JAXB, the parent class loader at that point is the Jersey bundle class loader:
(org.apache.felix.framework.BundleWiringImpl$BundleClassLoader) org.glassfish.jersey.core.jersey-server [256]
.This ultimately leads to class loading errors when
org.eclipse.persistence.internal.jaxb.WrappedValue
is being loaded byorg.eclipse.persistence.internal.jaxb.JaxbClassLoader.loadClass(String)
.I'm still researching the exact issue, but any hints would be appreciated.
The text was updated successfully, but these errors were encountered: