Details
-
Bug
-
Status: Open
-
Critical
-
Resolution: Unresolved
-
3.7.1
-
None
-
None
-
JVM
Description
gremlin-shaded is using the Maven shade plugin to package the release jar. Unfortunately, it isn't configured to handle the Jackson multi-release classes, so the shading is incomplete. You can see that by inspecting the contents of the jar (focusing on just FastIntegerMath below):
% jar -tvf gremlin-shaded-3.7.1.jar
...
org/apache/tinkerpop/shaded/jackson/core/io/doubleparser/FastIntegerMath.class
META-INF/versions/11/com/fasterxml/jackson/core/io/doubleparser/FastIntegerMath.class
META-INF/versions/17/com/fasterxml/jackson/core/io/doubleparser/FastIntegerMath.class
META-INF/versions/19/com/fasterxml/jackson/core/io/doubleparser/FastIntegerMath.class
...
Notice how the shading is only applied to the default version of the class. The multi-release classes are not being shaded. This, in our case, is causing classpath conflicts with our chosen Jackson version.
The shading config is here: https://github.com/apache/tinkerpop/blob/master/gremlin-shaded/pom.xml#L60
According to stackoverflow, the shading plugin has a multi-release option:
https://stackoverflow.com/questions/53049346/is-log4j2-compatible-with-java-11/54713830#54713830