# License 2.1.1 Jar Hell Error

**URL:** <https://discuss.elastic.co/t/license-2-1-1-jar-hell-error/44782>\
**Category:** Elasticsearch\
**Created:** [March 18, 2016, 12:47am UTC](https://discuss.elastic.co/t/license-2-1-1-jar-hell-error/44782 "2016-03-18T00:47:24Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dparkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dparkar/32/7396_2.png) [@dparkar](https://discuss.elastic.co/u/dparkar)\
**Post date:** [March 18, 2016, 12:47am UTC](https://discuss.elastic.co/t/license-2-1-1-jar-hell-error/44782/1 "2016-03-18T00:47:24Z")

</div>

Following is the error I am seeing on my nodes :

[2016-03-17 17:37:22,708][ERROR][bootstrap] Exception  
java.lang.IllegalStateException: failed to load bundle [file:/D:/ElasticSearch/pluginVersioned/license/2.2.1/license-2.2.1.jar, file:/D:/ElasticSearch/pluginVersioned/license/2.2.1/license-core-2.2.1.jar, file:/D:/ElasticSearch/pluginVersioned/license/2.2.1/license-plugin-api-2.2.1.jar, file:/D:/ElasticSearch/pluginVersioned/marvel-agent/2.2.1/marvel-agent-2.2.1.jar] due to jar hell  
at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:421)  
at org.elasticsearch.plugins.PluginsService.(PluginsService.java:129)  
at org.elasticsearch.node.Node.(Node.java:146)  
at org.elasticsearch.node.Node.(Node.java:128)  
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)  
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178)  
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285)  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)  
Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "D:\ElasticSearch\pluginVersioned\license\2.2.1\license-2.2.1.jar" "read")  
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)  
at java.security.AccessController.checkPermission(AccessController.java:559)  
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)  
at java.lang.SecurityManager.checkRead(SecurityManager.java:888)  
at java.util.zip.ZipFile.(ZipFile.java:206)  
at java.util.zip.ZipFile.(ZipFile.java:145)  
at java.util.jar.JarFile.(JarFile.java:153)  
at java.util.jar.JarFile.(JarFile.java:90)  
at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:174)  
at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:419)  
... 7 more

I don't want to disable the Java Security Manager. I have added a plugin-security.policy file in the License plugin folder next to the jars. Here's what the file looks like :

grant {  
// needed to set expert SSL options, etc  
permission java.lang.RuntimePermission "setFactory";  
permission javax.net.ssl.SSLPermission "setHostnameVerifier";  
permission java.io.FilePermission "\*";  
};

Even then I get the above error.

---

<div class="post-metadata">

**Author:** ![skearns](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skearns/32/125945_2.png) [@skearns](https://discuss.elastic.co/u/skearns)\
**Post date:** [March 18, 2016, 12:57am UTC](https://discuss.elastic.co/t/license-2-1-1-jar-hell-error/44782/2 "2016-03-18T00:57:39Z")

</div>

How did you install Elasticsearch? Did you change anything from the default configuration?

I don't recognize the folder "pluginVersioned" - is that something you created?

Please do not change or add to the contents of the plugin directory - it is not necessary, and we need to figure out what the real problem is.

---

<div class="post-metadata">

**Author:** ![dparkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dparkar/32/7396_2.png) [@dparkar](https://discuss.elastic.co/u/dparkar)\
**Post date:** [March 18, 2016, 1:08am UTC](https://discuss.elastic.co/t/license-2-1-1-jar-hell-error/44782/3 "2016-03-18T01:08:07Z")

</div>

elasticsearch is installed using offline method ... i.e. download it, change the yml file, and point elasticsearch to that yml file using the config parameter.

The only change I made was the bin/elasticsearch.bat file to add another argument for picking the config from another location.

pluginVersioned is another folder where I store all my plugins and initializing from there. There is no other plugin directory.

---

<div class="post-metadata">

**Author:** ![skearns](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skearns/32/125945_2.png) [@skearns](https://discuss.elastic.co/u/skearns)\
**Post date:** [March 18, 2016, 1:12am UTC](https://discuss.elastic.co/t/license-2-1-1-jar-hell-error/44782/4 "2016-03-18T01:12:09Z")

</div>

Can you try this in a fresh install, with default settings and directories? It sounds like you made a lot of changes to the configuration, and they are clearly the cause of the issue.

Are you installing the plugin using `bin/plugin`?

---

<div class="post-metadata">

**Author:** ![dparkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dparkar/32/7396_2.png) [@dparkar](https://discuss.elastic.co/u/dparkar)\
**Post date:** [March 18, 2016, 5:56am UTC](https://discuss.elastic.co/t/license-2-1-1-jar-hell-error/44782/5 "2016-03-18T05:56:46Z")

</div>

Fresh install works fine when the plugins are directly under the plugins folder next to bin folder. The problem is when using the path.plugins parameter in elasticsearch.yml file point to a different location. Additional complication in my case was that the plugins folder was symlinked.

Since the path.plugins parameter is still supported, can I get an example of how to setup the java security policy in the plugin folders if the folders are not under the elasticsearch folder ?

---

<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:** [March 18, 2016, 6:31am UTC](https://discuss.elastic.co/t/license-2-1-1-jar-hell-error/44782/6 "2016-03-18T06:31:33Z")

</div>

IIRC we don't support symlinks for some dirs (if not all) so it's probably the issue here.

---

<div class="post-metadata">

**Author:** ![skearns](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skearns/32/125945_2.png) [@skearns](https://discuss.elastic.co/u/skearns)\
**Post date:** [March 18, 2016, 12:22pm UTC](https://discuss.elastic.co/t/license-2-1-1-jar-hell-error/44782/7 "2016-03-18T12:22:38Z")

</div>

Can you explain your use-case for needing to specify path.plugins?

---

<div class="post-metadata">

**Author:** ![dparkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dparkar/32/7396_2.png) [@dparkar](https://discuss.elastic.co/u/dparkar)\
**Post date:** [March 18, 2016, 6:58pm UTC](https://discuss.elastic.co/t/license-2-1-1-jar-hell-error/44782/8 "2016-03-18T18:58:54Z")

</div>

symlinks definitely worked before 2.0.0 .. we have been using it ... did it change after \> 2.0.0 ?

---

<div class="post-metadata">

**Author:** ![dparkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dparkar/32/7396_2.png) [@dparkar](https://discuss.elastic.co/u/dparkar)\
**Post date:** [March 18, 2016, 7:11pm UTC](https://discuss.elastic.co/t/license-2-1-1-jar-hell-error/44782/9 "2016-03-18T19:11:11Z")

</div>

We have a separate folder structure where we have all of our plugins for each version. Similarly for elasticsearch and kibana. Then we have a deployment solution which allows us to deploy the desired versions of elasticsearch and kibana along with desired plugins by simply symlinking them under one folder and then using path.plugins. This allows us to deploy different configurations on different environments.

However, now, marvel and license strictly have to be of the same version as elasticsearch. This slightly makes things simpler, coz there is no way to configure different versions of these plugins for elasticsearch. Hence, I directly pushed these plugins under the elasticsearch plugins folder. But this doesn't allow me now to "not deploy" the plugins in another environment. And for other plugins which may not have strict requirements as marvel and license, this problem still stands.

---

<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:** [March 18, 2016, 7:28pm UTC](https://discuss.elastic.co/t/license-2-1-1-jar-hell-error/44782/10 "2016-03-18T19:28:08Z")

</div>

Yes it did.

---

<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:07pm UTC](https://discuss.elastic.co/t/license-2-1-1-jar-hell-error/44782/11 "2017-07-05T23:07:03Z")

</div>


