# Could not find or load main class org.elasticsearch.plugins.PluginManagerCliParser

**URL:** <https://discuss.elastic.co/t/could-not-find-or-load-main-class-org-elasticsearch-plugins-pluginmanagercliparser/97474>\
**Category:** Elasticsearch\
**Created:** [August 17, 2017, 7:05pm UTC](https://discuss.elastic.co/t/could-not-find-or-load-main-class-org-elasticsearch-plugins-pluginmanagercliparser/97474 "2017-08-17T19:05:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![whuang2](https://avatars.discourse-cdn.com/v4/letter/w/47e85d/32.png) [@whuang2](https://discuss.elastic.co/u/whuang2)\
**Post date:** [August 17, 2017, 7:05pm UTC](https://discuss.elastic.co/t/could-not-find-or-load-main-class-org-elasticsearch-plugins-pluginmanagercliparser/97474/1 "2017-08-17T19:05:09Z")

</div>

I am trying to upgrade ES from 2.0.1 to 5.5.1, elasticsearch-5.5.1.jar giving follow error:  
Could not find or load main class org.elasticsearch.plugins.PluginManagerCliParser

What is the proper way to upgrade ES from 2.0.1 to 5.5.1?  
I am simply replacing lib folder jars into existing one, because our application has custom ssl plugins and infrastructure stuff.

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [August 17, 2017, 7:17pm UTC](https://discuss.elastic.co/t/could-not-find-or-load-main-class-org-elasticsearch-plugins-pluginmanagercliparser/97474/2 "2017-08-17T19:17:57Z")

</div>

The `lib` directory is not sufficient. You should remove your existing installation, and install a fresh copy of the new elasticsearch version. In this case, it seems you are still using the old bin scripts.

---

<div class="post-metadata">

**Author:** ![whuang2](https://avatars.discourse-cdn.com/v4/letter/w/47e85d/32.png) [@whuang2](https://discuss.elastic.co/u/whuang2)\
**Post date:** [August 17, 2017, 10:24pm UTC](https://discuss.elastic.co/t/could-not-find-or-load-main-class-org-elasticsearch-plugins-pluginmanagercliparser/97474/3 "2017-08-17T22:24:06Z")

</div>

I compared the bin folder and patch in the differences, now bin/plugin uses PluginManagerCliParser, so this error is resolved.

Now next hurdle, What does this exception mean:

Exception in thread "main" java.lang.NoSuchFieldError: LUCENE\_5\_3\_1  
at org.elasticsearch.Version.(Version.java:51)  
at org.elasticsearch.common.io.stream.StreamOutput.(StreamOutput.java:74)  
at org.elasticsearch.common.io.stream.BytesStream.(BytesStream.java:24)  
at org.elasticsearch.common.io.stream.BytesStreamOutput.(BytesStreamOutput.java:59)  
at org.elasticsearch.common.io.stream.BytesStreamOutput.(BytesStreamOutput.java:56)  
at org.elasticsearch.common.io.stream.BytesStreamOutput.(BytesStreamOutput.java:46)  
at org.elasticsearch.common.xcontent.XContentBuilder.builder(XContentBuilder.java:69)  
at org.elasticsearch.common.settings.Setting.arrayToParsableString(Setting.java:868)  
at org.elasticsearch.common.settings.Setting.lambda$listSetting$29(Setting.java:814)  
at org.elasticsearch.common.settings.Setting$2.getRaw(Setting.java:818)  
at org.elasticsearch.common.settings.Setting.lambda$listSetting$27(Setting.java:802)  
at org.elasticsearch.common.settings.Setting.listSetting(Setting.java:807)  
at org.elasticsearch.common.settings.Setting.listSetting(Setting.java:802)  
at org.elasticsearch.env.Environment.(Environment.java:60)  
at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:90)  
at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:72)  
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67)  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)  
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:69)  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)  
at org.elasticsearch.cli.Command.main(Command.java:88)  
at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:47)

---

<div class="post-metadata">

**Author:** ![whuang2](https://avatars.discourse-cdn.com/v4/letter/w/47e85d/32.png) [@whuang2](https://discuss.elastic.co/u/whuang2)\
**Post date:** [August 17, 2017, 10:38pm UTC](https://discuss.elastic.co/t/could-not-find-or-load-main-class-org-elasticsearch-plugins-pluginmanagercliparser/97474/4 "2017-08-17T22:38:03Z")

</div>

> [@whuang2](#):
>
> Exception in thread “main” java.lang.NoSuchFieldError: LUCENE\_5\_3\_1

After removing old lucene jar, only keep new lucene jar from 5.5.1, the above exception is gone.

---

<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:** [September 14, 2017, 10:38pm UTC](https://discuss.elastic.co/t/could-not-find-or-load-main-class-org-elasticsearch-plugins-pluginmanagercliparser/97474/5 "2017-09-14T22:38:27Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
