Is there a JAXB-API installation bug in Nuxeo apt package?

I notice that the 6.0-01 package installs:


But after, Jersey 1.17.1 is required by Nuxeo, and this requires JAXB API 2.1+. I believe this is causing an issue with a Marketplace package I have written that depends on jersey-json with ${jersey.version} (Nuxeo's variable). After the base install, I see these results:


And after my package is installed, I see this:


This leads to startup failures complaining about the old and new versions of JAXB.

The only dependencies I declare that has anything to do with this are:


0 votes

1 answers



After a second review it seems like the 2.0 jar might not be part of the problem:

java.lang.LinkageError: JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/var/lib/nuxeo/server/nxserver/lib/jaxb-impl-2.2.3-1.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See

I'm not sure why depending on the same version of Jersey for jersey-json that Nuxeo uses for jersey-core causes this problem, though.


I ended up doing the following adaptation of the Marketplace packaging we use (based on Nuxeo Marketplace packaging examples on GitHub):

Add an endorsed section to the install.xml template in src/main/resources:


Add code to the assembly.xml file to generate an instruction to copy the jaxb-api jar to endorsed/:

<var name="install.endorsed" value="" />
  <available file="${outdir}/marketplace/install/lib/jaxb-api-2.2.2.jar" />
    <var name="install.endorsed"
                &lt;copy file=&quot;${package.root}/install/lib/jaxb-api-2.2.2.jar&quot;${line.separator}
                todir=&quot;${env.server.home}/endorsed&quot; overwrite=&quot;true&quot; /&gt;${line.separator}
                &lt;delete file=&quot;${env.server.home}/endorsed/jaxb-api-2.0.jar&quot; /&gt;" />
<copy file="src/main/resources/install.xml"
    <filter token="BUNDLES" value="${install.bundles}" />
    <filter token="LIBS" value="${install.libs}" />
    <filter token="PROPERTIES" value="${}" />
    <filter token="TEMPLATES" value="${install.templates}" />
    <filter token="ENDORSED" value="${install.endorsed}" />

This produces the effect of removing jaxb-api-2.0.jar and adding jaxb-api-2.2.2.jar to the endorsed/ directory when our custom package is installed. I do not see any obvious problems when I restart Nuxeo and use it on my development machine. However, this seems like a brittle way to address this JAXB API JAR versioning issue.

Is there any better solution?

0 votes

Thanks, we shouldn't include things in endorsed anymore as the JDK has a more recent version now. This dates from a while back. I opened NXP-16270 to review and fix this.

Thanks… with that news it seems like handling the workaround (removal of the jaxb-api-2.0.jar) is better done in our server configuration management instead of in the Marketplace package like above.