# NoClassDefFoundError in ElasticSearch

**URL:** <https://discuss.elastic.co/t/noclassdeffounderror-in-elasticsearch/59020>\
**Category:** Elasticsearch\
**Created:** [August 26, 2016, 9:28am UTC](https://discuss.elastic.co/t/noclassdeffounderror-in-elasticsearch/59020 "2016-08-26T09:28:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tipra](https://avatars.discourse-cdn.com/v4/letter/t/a9adbd/32.png) [@Tipra](https://discuss.elastic.co/u/Tipra)\
**Post date:** [August 26, 2016, 9:28am UTC](https://discuss.elastic.co/t/noclassdeffounderror-in-elasticsearch/59020/1 "2016-08-26T09:28:39Z")

</div>

I upgraded my project from Es 2.1.2. to Es 2.2.0 . I made the required changes in my plugin and installed it. Now when I run any request on ES , it throws **NoClassDefFoundError** for a class which is present in one of the JARs in the plugin.

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [August 30, 2016, 6:43am UTC](https://discuss.elastic.co/t/noclassdeffounderror-in-elasticsearch/59020/2 "2016-08-30T06:43:33Z")

</div>

Hi @Tipra,

from the [Javadoc for throws NoClassDefFoundError](http://docs.oracle.com/javase/8/docs/api/java/lang/NoClassDefFoundError.html):

> Thrown if the Java Virtual Machine or a ClassLoader instance  
> tries to load in the definition of a class (as part of a normal method call  
> or as part of creating a new instance using the new expression)  
> and no definition of the class could be found.

> The searched-for class definition existed when the currently  
> executing class was compiled, but the definition can no longer be  
> found.

In other words, the class was there when you compiled your plugin but it does not seem to be bundled with your plugin. Can you please double-check that the class is indeed there in the ZIP file of your plugin? Did you maybe specify scope `provided` in your build file?

Daniel

---

<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, 10:24pm UTC](https://discuss.elastic.co/t/noclassdeffounderror-in-elasticsearch/59020/3 "2017-07-05T22:24:13Z")

</div>


