12-26-2014 05:06 PM
I notice that the 6.0-01 package installs:
/var/lib/nuxeo/server/nxserver/lib/jaxb-impl-2.0.3.jar
But after https://jira.nuxeo.com/browse/NXP-12617, 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:
/var/lib/nuxeo/server/endorsed/jaxb-api-2.0.jar
/var/lib/nuxeo/server/nxserver/lib/cxf-rt-databinding-jaxb-2.6.8.jar
/var/lib/nuxeo/server/nxserver/lib/jaxb-impl-2.0.3.jar
And after my package is installed, I see this:
/var/lib/nuxeo/server/endorsed/jaxb-api-2.0.jar
/var/lib/nuxeo/server/nxserver/lib/cxf-rt-databinding-jaxb-2.6.8.jar
/var/lib/nuxeo/server/nxserver/lib/jaxb-impl-2.2.3-1.jar
/var/lib/nuxeo/server/nxserver/lib/jaxb-api-2.2.2.jar
/var/lib/nuxeo/server/nxserver/lib/jaxb-impl-2.0.3.jar
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:
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-multipart</artifactId>
<version>${jersey.version}</version>
</dependency>
12-28-2014 10:32 PM
After a second review it seems like the 2.0 jar might not be part of the problem
12-28-2014 11:40 PM
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:
<install>
@BUNDLES@
@LIBS@
@PROPERTIES@
@TEMPLATES@
@ENDORSED@
</install>
Add code to the assembly.xml
file to generate an instruction to copy the jaxb-api
jar to endorsed/
:
<var name="install.endorsed" value="" />
<if>
<available file="${outdir}/marketplace/install/lib/jaxb-api-2.2.2.jar" />
<then>
<var name="install.endorsed"
value="${line.separator}
<copy file="${package.root}/install/lib/jaxb-api-2.2.2.jar"${line.separator}
todir="${env.server.home}/endorsed" overwrite="true" />${line.separator}
<delete file="${env.server.home}/endorsed/jaxb-api-2.0.jar" />" />
</then>
</if>
<copy file="src/main/resources/install.xml"
todir="${outdir}/marketplace"
overwrite="true">
<filter token="BUNDLES" value="${install.bundles}" />
<filter token="LIBS" value="${install.libs}" />
<filter token="PROPERTIES" value="${install.properties}" />
<filter token="TEMPLATES" value="${install.templates}" />
<filter token="ENDORSED" value="${install.endorsed}" />
</copy>
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?
12-29-2014 06:32 AM
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](https
12-29-2014 12:25 PM
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.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.