# Plugin Jar Hell

**URL:** <https://discuss.elastic.co/t/plugin-jar-hell/40309>\
**Category:** Elasticsearch\
**Created:** [January 28, 2016, 1:04am UTC](https://discuss.elastic.co/t/plugin-jar-hell/40309 "2016-01-28T01:04:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![krasnaya](https://avatars.discourse-cdn.com/v4/letter/k/6bbea6/32.png) [@krasnaya](https://discuss.elastic.co/u/krasnaya)\
**Post date:** [January 28, 2016, 1:04am UTC](https://discuss.elastic.co/t/plugin-jar-hell/40309/1 "2016-01-28T01:04:27Z")

</div>

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 `plugin-descriptor.properties`, 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

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [January 28, 2016, 1:38am UTC](https://discuss.elastic.co/t/plugin-jar-hell/40309/2 "2016-01-28T01:38:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 28, 2016, 5:52am UTC](https://discuss.elastic.co/t/plugin-jar-hell/40309/3 "2016-01-28T05:52:40Z")

</div>

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 [https://www.elastic.co/blog/to-shade-or-not-to-shade](https://www.elastic.co/blog/to-shade-or-not-to-shade)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:20pm UTC](https://discuss.elastic.co/t/plugin-jar-hell/40309/4 "2017-07-05T23:20:54Z")

</div>


