# Bin/plugin Failing to find org.elasticsearch.plugins.PluginManager

**URL:** <https://discuss.elastic.co/t/bin-plugin-failing-to-find-org-elasticsearch-plugins-pluginmanager/9910>\
**Category:** Elasticsearch\
**Created:** [December 1, 2012, 2:28am UTC](https://discuss.elastic.co/t/bin-plugin-failing-to-find-org-elasticsearch-plugins-pluginmanager/9910 "2012-12-01T02:28:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![amiribarksdale](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@amiribarksdale](https://discuss.elastic.co/u/amiribarksdale)\
**Post date:** [December 1, 2012, 2:28am UTC](https://discuss.elastic.co/t/bin-plugin-failing-to-find-org-elasticsearch-plugins-pluginmanager/9910/1 "2012-12-01T02:28:08Z")

</div>

After trying and failing to run elasticsearch/bin/plugin, which would fail  
with this:

Exception in thread "main" java.lang.NoClassDefFoundError: org/elasticsearch  
/plugins/PluginManager  
Caused by: java.lang.ClassNotFoundException: org.elasticsearch.plugins.  
PluginManager  
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)  
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)  
Could not find the main class: org.elasticsearch.plugins.PluginManager.  
Program will exit.

I dug in to see what was being run by echoing the exec line at the end  
of elasticsearch/bin/plugin. As a test, I decided to run a stripped down  
version of the command, to see whether I could get the usage menu instead  
of the error above. Here is the stripped down command:

/usr/bin/java -Xmx64m -Xms16m -Delasticsearch -Des.path.home=/var/local/elasticsearch  
-classpath "/var/local/elasticsearch/lib/elasticsearch-0.19.11.jar" org.  
elasticsearch.plugins.PluginManager

This command works fine on my linux machine, but not in my Mac vm, running  
ubuntu 12.04. I cannot figure it out. This gist shows the command and the  
output:

> <https://gist.github.com/amiri/a2c4ee4682d5ba7ab80d>

Amiri

--

---

<div class="post-metadata">

**Author:** ![mvg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mvg/32/98890_2.png) [@mvg](https://discuss.elastic.co/u/mvg)\
**Post date:** [December 3, 2012, 12:29pm UTC](https://discuss.elastic.co/t/bin-plugin-failing-to-find-org-elasticsearch-plugins-pluginmanager/9910/2 "2012-12-03T12:29:36Z")

</div>

Hi Amiri,

How did you install ES on your vm box? Also are you sure that  
'/var/local/elasticsearch/lib/elasticsearch-0.19.11.jar' file exists?

Martijn

On 1 December 2012 13:28, Amiri Barksdale [amiribarksdale@gmail.com](mailto:amiribarksdale@gmail.com) wrote:

> After trying and failing to run elasticsearch/bin/plugin, which would fail  
> with this:
> 
> Exception in thread "main" java.lang.NoClassDefFoundError:  
> org/elasticsearch/plugins/PluginManager  
> Caused by: java.lang.ClassNotFoundException:  
> org.elasticsearch.plugins.PluginManager  
> at java.net.URLClassLoader$1.run(URLClassLoader.java:217)  
> at java.security.AccessController.doPrivileged(Native Method)  
> at java.net.URLClassLoader.findClass(URLClassLoader.java:205)  
> at java.lang.ClassLoader.loadClass(ClassLoader.java:321)  
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)  
> at java.lang.ClassLoader.loadClass(ClassLoader.java:266)  
> Could not find the main class: org.elasticsearch.plugins.PluginManager.  
> Program will exit.
> 
> I dug in to see what was being run by echoing the exec line at the end of  
> elasticsearch/bin/plugin. As a test, I decided to run a stripped down  
> version of the command, to see whether I could get the usage menu instead of  
> the error above. Here is the stripped down command:
> 
> /usr/bin/java -Xmx64m -Xms16m -Delasticsearch  
> -Des.path.home=/var/local/elasticsearch -classpath  
> "/var/local/elasticsearch/lib/elasticsearch-0.19.11.jar"  
> org.elasticsearch.plugins.PluginManager
> 
> This command works fine on my linux machine, but not in my Mac vm, running  
> ubuntu 12.04. I cannot figure it out. This gist shows the command and the  
> output:
> 
> [gist:a2c4ee4682d5ba7ab80d · GitHub](https://gist.github.com/a2c4ee4682d5ba7ab80d)
> 
> Amiri
> 
> --

--  
Met vriendelijke groet,

Martijn van Groningen

--

---

<div class="post-metadata">

**Author:** ![amiribarksdale](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@amiribarksdale](https://discuss.elastic.co/u/amiribarksdale)\
**Post date:** [December 3, 2012, 5:45pm UTC](https://discuss.elastic.co/t/bin-plugin-failing-to-find-org-elasticsearch-plugins-pluginmanager/9910/3 "2012-12-03T17:45:56Z")

</div>

On Monday, December 3, 2012 4:29:36 AM UTC-8, Martijn v Groningen wrote:

> Hi Amiri,
> 
> How did you install ES on your vm box? Also are you sure that  
> '/var/local/elasticsearch/lib/elasticsearch-0.19.11.jar' file exists?

I installed elasticsearch by downloading the binaries from  
[http://cloud.github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.11.tar.gz](http://cloud.github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.11.tar.gz)  
and dropping them in /var/local/elasticsearch.

The file exists, and the directory contains

elasticsearch-0.19.11.jar  
lucene-analyzers-3.6.1.jar  
lucene-memory-3.6.1.jar  
snappy-java-1.0.4.1.jar  
jna-3.3.0.jar  
lucene-core-3.6.1.jar  
lucene-queries-3.6.1.jar  
log4j-1.2.17.jar  
lucene-highlighter-3.6.1.jar  
sigar

and that command is only an attempt to force the issue after the normal way  
of trying to install a plugin failed:

/var/local/elasticsearch/bin/plugin -install Aconex/elasticsearch-head

Running that command just above produced the same error as at the top of  
this gist: [https://gist.github.com/cf11a322b31e08d3fc9c](https://gist.github.com/cf11a322b31e08d3fc9c)

Amiri

--

---

<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:** [December 3, 2012, 6:58pm UTC](https://discuss.elastic.co/t/bin-plugin-failing-to-find-org-elasticsearch-plugins-pluginmanager/9910/4 "2012-12-03T18:58:54Z")

</div>

What are the file permissions of the jars? Perhaps you installed as root  
and are running as a different user. Not sure if a normal user can write  
into /var/local on a Mac.

BTW, you should be using the forked repo mobz/elasticsearch-head.

Cheers,

Ivan

On Mon, Dec 3, 2012 at 9:45 AM, Amiri Barksdale [amiribarksdale@gmail.com](mailto:amiribarksdale@gmail.com)wrote:

> On Monday, December 3, 2012 4:29:36 AM UTC-8, Martijn v Groningen wrote:
> 
> > Hi Amiri,
> > 
> > How did you install ES on your vm box? Also are you sure that  
> > '/var/local/elasticsearch/lib/\*\*elasticsearch-0.19.11.jar' file exists?
> 
> I installed elasticsearch by downloading the binaries from  
> [http://cloud.github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.11.tar.gzand](http://cloud.github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.11.tar.gzand) dropping them in /var/local/elasticsearch.
> 
> The file exists, and the directory contains
> 
> elasticsearch-0.19.11.jar  
> lucene-analyzers-3.6.1.jar  
> lucene-memory-3.6.1.jar  
> snappy-java-1.0.4.1.jar  
> jna-3.3.0.jar  
> lucene-core-3.6.1.jar  
> lucene-queries-3.6.1.jar  
> log4j-1.2.17.jar  
> lucene-highlighter-3.6.1.jar  
> sigar
> 
> and that command is only an attempt to force the issue after the normal  
> way of trying to install a plugin failed:
> 
> /var/local/elasticsearch/bin/plugin -install Aconex/elasticsearch-head
> 
> Running that command just above produced the same error as at the top of  
> this gist: [https://gist.github.com/cf11a322b31e08d3fc9c](https://gist.github.com/cf11a322b31e08d3fc9c)
> 
> Amiri
> 
> --

--

---

<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 6, 2017, 3:01am UTC](https://discuss.elastic.co/t/bin-plugin-failing-to-find-org-elasticsearch-plugins-pluginmanager/9910/5 "2017-07-06T03:01:46Z")

</div>


