I'm trying to build an Elasticsearch plugin and when I build it with Maven I don't get any errors. However when I try to install it I get an error saying:
failed to load plugin es-corenlp due to jar hell
Caused by: java.lang.IllegalStateException: jar hell! class: com.sun.xml.bind.Locatable jar1: /usr/share/elasticsearch/plugins/.installing-10579885053273466174/jaxb-impl-2.4.0-b180830.0438.jar
jar2: /usr/share/elasticsearch/plugins/.installing-10579885053273466174/jaxb-core-2.3.0.1.jar at org.elasticsearch.bootstrap.JarHell.checkClass(JarHell.java:277)
Notice the two jars have different names and versions. Why is this happening?
[INFO] es-corenlp:es-corenlp:jar:1.0-SNAPSHOT
[INFO] +- edu.stanford.nlp:stanford-corenlp:jar:3.9.2:compile
[INFO] | +- com.apple:AppleJavaExtensions:jar:1.4:compile
[INFO] | +- de.jollyday:jollyday:jar:0.4.9:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.3.1:compile
[INFO] | +- javax.servlet:javax.servlet-api:jar:3.0.1:compile
[INFO] | +- com.io7m.xom:xom:jar:1.2.10:compile
[INFO] | | +- xml-apis:xml-apis:jar:1.3.03:compile
[INFO] | | +- xerces:xercesImpl:jar:2.8.0:compile
[INFO] | | - xalan:xalan:jar:2.7.0:compile
[INFO] | +- com.googlecode.efficient-java-matrix-library:ejml:jar:0.23:compile
[INFO] | +- org.glassfish:javax.json:jar:1.0.4:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.12:compile
[INFO] | +- com.google.protobuf:protobuf-java:jar:3.2.0:compile
[INFO] | +- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] | +- javax.xml.bind:jaxb-api:jar:2.4.0-b180830.0359:compile
[INFO] | +- com.sun.xml.bind:jaxb-core:jar:2.3.0.1:compile
[INFO] | - com.sun.xml.bind:jaxb-impl:jar:2.4.0-b180830.0438:compile
[INFO] +- edu.stanford.nlp:stanford-corenlp:jar:models:3.9.2:compile