Plugin Jar Hell


I'm working on an elasticsearch plugin, and it was working fine until I decided to add Jackson as a dependency. When trying to install my plugin, I now get the following error. I have confirmed that a clean installation of elasticsearch comes with libexec/lib/jackson-core-2.6.2.jar. However, my plugin is bundling jackson-core-2.7.0.jar in its zip file. I have tried manually setting isolated=true in the, but that didn't make a difference.

ERROR: java.lang.IllegalStateException: jar hell!
class: com.fasterxml.jackson.core.Base64Variant
jar1: /usr/local/Cellar/elasticsearch/2.1.1/libexec/lib/jackson-core-2.6.2.jar
jar2: /var/folders/km/s_pt1gl16ds7zvff3k15z7100000gn/T/206021445454779585/temp_name-110663077/jackson-core-2.7.0.jar

(Ivan Brusic) #2

Which build system are you using? Can you remove the dependency at package

(David Pilato) #3

Indeed. You must use the same version as provided by elasticsearch.

Basically you should define elasticsearch as provided (in Maven).
You can not change libs used by elasticsearch.

You could potentially shade your own jackson lib to avoid such conflicts. See

(system) #4