# NoSuchMethodError cannot initialize es

**URL:** <https://discuss.elastic.co/t/nosuchmethoderror-cannot-initialize-es/8124>\
**Category:** Elasticsearch\
**Created:** [June 15, 2012, 4:36pm UTC](https://discuss.elastic.co/t/nosuchmethoderror-cannot-initialize-es/8124 "2012-06-15T16:36:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nelalx](https://avatars.discourse-cdn.com/v4/letter/n/7c8e57/32.png) [@nelalx](https://discuss.elastic.co/u/nelalx)\
**Post date:** [June 15, 2012, 4:36pm UTC](https://discuss.elastic.co/t/nosuchmethoderror-cannot-initialize-es/8124/1 "2012-06-15T16:36:09Z")

</div>

I tried elasticsearch versions 18.0,19.2 and 19.3 but can't initialize ES  
getting same Exception

[2012-06-15 11:59:20,439][INFO][node] [Nightmare]  
{0.19.2}[5113]: initializing ...  
[2012-06-15 11:59:20,448][INFO][plugins] [Nightmare]  
loaded [], sites [head]  
[2012-06-15 11:59:22,909][ERROR][bootstrap] {0.19.2}:  
Initialization Failed ...

1. NoSuchMethodError[org.apache.  
lucene.analysis.standard.StandardAnalyzer.(Lorg/apache/lucene/util/Version;)V]2)  
NoClassDefFoundError[Could not initialize class  
org.elasticsearch.common.lucene.Lucene]

---

<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:** [June 15, 2012, 4:40pm UTC](https://discuss.elastic.co/t/nosuchmethoderror-cannot-initialize-es/8124/2 "2012-06-15T16:40:45Z")

</div>

You have probably another Lucene Jar in your classloader, no ?

David 😉  
Twitter : @dadoonet / @elasticsearchfr

Le 15 juin 2012 à 18:36, nel [NeilAlex@algotree.com](mailto:NeilAlex@algotree.com) a écrit :

> I tried elasticsearch versions 18.0,19.2 and 19.3 but can't initialize ES getting same Exception
> 
> [2012-06-15 11:59:20,439][INFO][node] [Nightmare] {0.19.2}[5113]: initializing ...  
> [2012-06-15 11:59:20,448][INFO][plugins] [Nightmare] loaded , sites [head]  
> [2012-06-15 11:59:22,909][ERROR][bootstrap] {0.19.2}: Initialization Failed ...
> 
> 1. NoSuchMethodError[org.apache.  
> lucene.analysis.standard.StandardAnalyzer.(Lorg/apache/lucene/util/Version;)V]2) NoClassDefFoundError[Could not initialize class org.elasticsearch.common.lucene.Lucene]

---

<div class="post-metadata">

**Author:** ![nelalx](https://avatars.discourse-cdn.com/v4/letter/n/7c8e57/32.png) [@nelalx](https://discuss.elastic.co/u/nelalx)\
**Post date:** [June 15, 2012, 4:53pm UTC](https://discuss.elastic.co/t/nosuchmethoderror-cannot-initialize-es/8124/3 "2012-06-15T16:53:37Z")

</div>

Hi ,

Thankyou so much the reply..Being a newbie i jus got confused, i m sry  
if i am wrong,, by the term classsloader did you mean the jar in the java  
library..

thanks nel

On Friday, June 15, 2012 10:10:45 PM UTC+5:30, David Pilato wrote:

> You have probably another Lucene Jar in your classloader, no ?
> 
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr
> 
> Le 15 juin 2012 à 18:36, nel [NeilAlex@algotree.com](mailto:NeilAlex@algotree.com) a écrit :
> 
> > I tried elasticsearch versions 18.0,19.2 and 19.3 but can't initialize  
> > ES getting same Exception
> > 
> > [2012-06-15 11:59:20,439][INFO][node] [Nightmare]  
> > {0.19.2}[5113]: initializing ...  
> > [2012-06-15 11:59:20,448][INFO][plugins] [Nightmare]  
> > loaded , sites [head]  
> > [2012-06-15 11:59:22,909][ERROR][bootstrap] {0.19.2}:  
> > Initialization Failed ...
> > 
> > 1. NoSuchMethodError[org.apache.
> 
> lucene.analysis.standard.StandardAnalyzer.(Lorg/apache/lucene/util/Version;)V]2)  
> NoClassDefFoundError[Could not initialize class  
> org.elasticsearch.common.lucene.Lucene]

---

<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:** [June 15, 2012, 5:07pm UTC](https://discuss.elastic.co/t/nosuchmethoderror-cannot-initialize-es/8124/4 "2012-06-15T17:07:52Z")

</div>

Yes. Do you only start ES or are you trying to run it from java ?

Did you install plugins ?

David 😉  
Twitter : @dadoonet / @elasticsearchfr

Le 15 juin 2012 à 18:53, nel [NeilAlex@algotree.com](mailto:NeilAlex@algotree.com) a écrit :

> Hi ,
> 
> Thankyou so much the reply..Being a newbie i jus got confused, i m sry if i am wrong,, by the term classsloader did you mean the jar in the java library..
> 
> thanks nel
> 
> On Friday, June 15, 2012 10:10:45 PM UTC+5:30, David Pilato wrote:  
> You have probably another Lucene Jar in your classloader, no ?
> 
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr
> 
> Le 15 juin 2012 à 18:36, nel [NeilAlex@algotree.com](mailto:NeilAlex@algotree.com) a écrit :
> 
> > I tried elasticsearch versions 18.0,19.2 and 19.3 but can't initialize ES getting same Exception
> > 
> > [2012-06-15 11:59:20,439][INFO][node] [Nightmare] {0.19.2}[5113]: initializing ...  
> > [2012-06-15 11:59:20,448][INFO][plugins] [Nightmare] loaded , sites [head]  
> > [2012-06-15 11:59:22,909][ERROR][bootstrap] {0.19.2}: Initialization Failed ...
> > 
> > 1. NoSuchMethodError[org.apache.  
> > lucene.analysis.standard.StandardAnalyzer.(Lorg/apache/lucene/util/Version;)V]2) NoClassDefFoundError[Could not initialize class org.elasticsearch.common.lucene.Lucene]

---

<div class="post-metadata">

**Author:** ![nelalx](https://avatars.discourse-cdn.com/v4/letter/n/7c8e57/32.png) [@nelalx](https://discuss.elastic.co/u/nelalx)\
**Post date:** [June 15, 2012, 5:12pm UTC](https://discuss.elastic.co/t/nosuchmethoderror-cannot-initialize-es/8124/5 "2012-06-15T17:12:04Z")

</div>

Hi,,  
I just tried to start ES. No i didnt install any plugins..  
thanks  
nel

On Fri, Jun 15, 2012 at 10:37 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> Yes. Do you only start ES or are you trying to run it from java ?
> 
> Did you install plugins ?
> 
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr
> 
> Le 15 juin 2012 à 18:53, nel [NeilAlex@algotree.com](mailto:NeilAlex@algotree.com) a écrit :
> 
> Hi ,
> 
> Thankyou so much the reply..Being a newbie i jus got confused, i m sry  
> if i am wrong,, by the term classsloader did you mean the jar in the java  
> library..
> 
> thanks nel
> 
> On Friday, June 15, 2012 10:10:45 PM UTC+5:30, David Pilato wrote:
> 
> > You have probably another Lucene Jar in your classloader, no ?
> > 
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr
> > 
> > Le 15 juin 2012 à 18:36, nel [NeilAlex@algotree.com](mailto:NeilAlex@algotree.com) a écrit :
> > 
> > > I tried elasticsearch versions 18.0,19.2 and 19.3 but can't initialize  
> > > ES getting same Exception
> > > 
> > > [2012-06-15 11:59:20,439][INFO][node] [Nightmare]  
> > > {0.19.2}[5113]: initializing ...  
> > > [2012-06-15 11:59:20,448][INFO][plugins] [Nightmare]  
> > > loaded , sites [head]  
> > > [2012-06-15 11:59:22,909][ERROR][bootstrap] {0.19.2}:  
> > > Initialization Failed ...
> > > 
> > > 1. NoSuchMethodError[org.apache.  
> > > lucene.analysis.standard.**StandardAnalyzer.(Lorg/**  
> > > apache/lucene/util/Version;)V]\*\*2) NoClassDefFoundError[Could not  
> > > initialize class org.elasticsearch.common.\*\*lucene.Lucene]

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [June 15, 2012, 6:00pm UTC](https://discuss.elastic.co/t/nosuchmethoderror-cannot-initialize-es/8124/6 "2012-06-15T18:00:33Z")

</div>

As David said, it's most likely a class path issue. Open bin/elasticsearch  
in a text editor and add "echo" before exec in the foreground section:

```
if ["x$foreground" != "x"]; then
    es_parms="$es_parms -Des.foreground=yes"
    *echo* exec "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS $es_parms 

```

-Des.path.home="$ES\_HOME" -cp "$ES\_CLASSPATH" $props   
org.elasticsearch.bootstrap.Elasticsearch  
else

Then start elasticsearch with -f flag and check the class path that  
elasticsearch is running with.

On Friday, June 15, 2012 1:12:04 PM UTC-4, nel wrote:

> Hi,,  
> I just tried to start ES. No i didnt install any plugins..  
> thanks  
> nel
> 
> On Fri, Jun 15, 2012 at 10:37 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> 
> > Yes. Do you only start ES or are you trying to run it from java ?
> > 
> > Did you install plugins ?
> > 
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr
> > 
> > Le 15 juin 2012 à 18:53, nel [NeilAlex@algotree.com](mailto:NeilAlex@algotree.com) a écrit :
> > 
> > Hi ,
> > 
> > Thankyou so much the reply..Being a newbie i jus got confused, i m sry  
> > if i am wrong,, by the term classsloader did you mean the jar in the java  
> > library..
> > 
> > thanks nel
> > 
> > On Friday, June 15, 2012 10:10:45 PM UTC+5:30, David Pilato wrote:
> > 
> > > You have probably another Lucene Jar in your classloader, no ?
> > > 
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr
> > > 
> > > Le 15 juin 2012 à 18:36, nel [NeilAlex@algotree.com](mailto:NeilAlex@algotree.com) a écrit :
> > > 
> > > > I tried elasticsearch versions 18.0,19.2 and 19.3 but can't initialize  
> > > > ES getting same Exception
> > > > 
> > > > [2012-06-15 11:59:20,439][INFO][node]  
> > > > [Nightmare] {0.19.2}[5113]: initializing ...  
> > > > [2012-06-15 11:59:20,448][INFO][plugins]  
> > > > [Nightmare] loaded , sites [head]  
> > > > [2012-06-15 11:59:22,909][ERROR][bootstrap] {0.19.2}:  
> > > > Initialization Failed ...
> > > > 
> > > > 1. NoSuchMethodError[org.apache.  
> > > > lucene.analysis.standard.**StandardAnalyzer.(Lorg/**  
> > > > apache/lucene/util/Version;)V]\*\*2) NoClassDefFoundError[Could not  
> > > > initialize class org.elasticsearch.common.\*\*lucene.Lucene]

---

<div class="post-metadata">

**Author:** ![nelalx](https://avatars.discourse-cdn.com/v4/letter/n/7c8e57/32.png) [@nelalx](https://discuss.elastic.co/u/nelalx)\
**Post date:** [June 15, 2012, 6:15pm UTC](https://discuss.elastic.co/t/nosuchmethoderror-cannot-initialize-es/8124/7 "2012-06-15T18:15:30Z")

</div>

Hi,

thank you... let me try that.

On Fri, Jun 15, 2012 at 11:30 PM, Igor Motov [imotov@gmail.com](mailto:imotov@gmail.com) wrote:

> As David said, it's most likely a class path issue. Open bin/elasticsearch  
> in a text editor and add "echo" before exec in the foreground section:
> 
> ```
> if ["x$foreground" != "x"]; then
> es_parms="$es_parms -Des.foreground=yes"
> *echo* exec "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS $es_parms
> 
> ```
> 
> -Des.path.home="$ES\_HOME" -cp "$ES\_CLASSPATH" $props   
> org.elasticsearch.bootstrap.Elasticsearch  
> else
> 
> Then start elasticsearch with -f flag and check the class path that  
> elasticsearch is running with.
> 
> On Friday, June 15, 2012 1:12:04 PM UTC-4, nel wrote:
> 
> > Hi,,  
> > I just tried to start ES. No i didnt install any plugins..  
> > thanks  
> > nel
> > 
> > On Fri, Jun 15, 2012 at 10:37 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> > 
> > > Yes. Do you only start ES or are you trying to run it from java ?
> > > 
> > > Did you install plugins ?
> > > 
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr
> > > 
> > > Le 15 juin 2012 à 18:53, nel [NeilAlex@algotree.com](mailto:NeilAlex@algotree.com) a écrit :
> > > 
> > > Hi ,
> > > 
> > > Thankyou so much the reply..Being a newbie i jus got confused, i m  
> > > sry if i am wrong,, by the term classsloader did you mean the jar in the  
> > > java library..
> > > 
> > > thanks nel
> > > 
> > > On Friday, June 15, 2012 10:10:45 PM UTC+5:30, David Pilato wrote:
> > > 
> > > > You have probably another Lucene Jar in your classloader, no ?
> > > > 
> > > > David 😉  
> > > > Twitter : @dadoonet / @elasticsearchfr
> > > > 
> > > > Le 15 juin 2012 à 18:36, nel [NeilAlex@algotree.com](mailto:NeilAlex@algotree.com) a écrit :
> > > > 
> > > > > I tried elasticsearch versions 18.0,19.2 and 19.3 but can't  
> > > > > initialize ES getting same Exception
> > > > > 
> > > > > [2012-06-15 11:59:20,439][INFO][node]  
> > > > > [Nightmare] {0.19.2}[5113]: initializing ...  
> > > > > [2012-06-15 11:59:20,448][INFO][plugins]  
> > > > > [Nightmare] loaded , sites [head]  
> > > > > [2012-06-15 11:59:22,909][ERROR][bootstrap] {0.19.2}:  
> > > > > Initialization Failed ...
> > > > > 
> > > > > 1. NoSuchMethodError[org.apache.  
> > > > > lucene.analysis.standard. **Stand** ardAnalyzer.(Lorg/ **apache**  
> > > > > /lucene/util/Version;)V]\*\*2) NoClassDefFoundError[Could not initialize  
> > > > > class org.elasticsearch.common. **lucen** e.Lucene]

---

<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:23am UTC](https://discuss.elastic.co/t/nosuchmethoderror-cannot-initialize-es/8124/8 "2017-07-06T03:23:50Z")

</div>


