You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Client SDK: shaded JAXB runtime is not found through jaxb.properties #1185
The client SDK (openam-clientsdk) shades org.glassfish.jaxb:jaxb-runtime and org.glassfish.jaxb:jaxb-core and relocates every org/ package to org.forgerock.openam.sdk.org.. The jaxb.properties files of the federation schema packages (com.sun.identity.saml2.jaxb.*, com.sun.identity.federation.jaxb.*, com.sun.identity.wsfederation.jaxb.* and the jaxb packages under com.sun.identity.liberty.ws) are not relocated, and the shade plugin does not rewrite .properties content, so they still name org.glassfish.jaxb.runtime.v2.ContextFactory.
JAXBContext.newInstance over those packages in the client SDK therefore fails with ClassNotFoundException: org.glassfish.jaxb.runtime.v2.ContextFactory: jakarta.xml.bind 3.0.1 ContextFinder does not fall back to another factory when the class named in jaxb.properties is missing.
This is not a regression of #1023. Before it, the same files named com.sun.xml.bind.ContextFactory_1_0_1, which the client SDK never bundled.
Possible fixes, neither verified against a built client SDK jar:
stop shading jaxb-runtime, jaxb-core, txw2 and istack-commons-runtime, so that they stay dependencies of the dependency-reduced POM;
exclude org.glassfish.jaxb.** from the org/ relocation.
Either fix should be checked by creating a JAXBContext over SAML2MetaUtils' package list with only the shaded client SDK jar on the classpath.
Activity