-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 6.0, 7.2
-
Component/s: Automation
-
Tags:
-
Sprint:TGV 7.2-4
Create a project that uses the 7.2 automation client that don't inherit from nuxeo addons pom.
When I run a simple test to create a document, I get a NoClassDefFoundError. The first part of the stack trace is: java.lang.NoClassDefFoundError: org/apache/commons/codec/Charsets
Actually it seems that by default it uses the comons-codec 1.6 that doesn't include the Charset class.
The issue is fixed when we specify in the maven project dependencies to use the commons-codec 1.9 (the one used in the automation server)
Even when using the shaded automation client with all jars dependencies it fails because commons-codec has been excluded.
A workaround could be to use java.nio.charset.StandardCharsets in /nuxeo-features/nuxeo-automation/nuxeo-automation-client/src/main/java/org/nuxeo/ecm/automation/client/jaxrs/impl/HttpConnector.java