# java.lang.NoSuchFieldError: LUCENE\_8\_0\_0

**URL:** <https://discuss.elastic.co/t/java-lang-nosuchfielderror-lucene-8-0-0/169959>\
**Category:** Elasticsearch\
**Created:** [February 26, 2019, 9:01am UTC](https://discuss.elastic.co/t/java-lang-nosuchfielderror-lucene-8-0-0/169959 "2019-02-26T09:01:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![liuxyshcn](https://avatars.discourse-cdn.com/v4/letter/l/58f4c7/32.png) [@liuxyshcn](https://discuss.elastic.co/u/liuxyshcn)\
**Post date:** [February 26, 2019, 9:01am UTC](https://discuss.elastic.co/t/java-lang-nosuchfielderror-lucene-8-0-0/169959/1 "2019-02-26T09:01:15Z")

</div>

I am just starting to learn to use elasticsearch and trying to get some documents from elasticsearch server using java rest client in the first picture.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/6/86f5ad15353bb4c6e6b014cf76405cea22e6a386.png)

An error occured when I ran the code as an application.Here is the error information

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/9/099537bf7fdb7caf18b70c9af184e86dd7cf8f0c.png)

I checked out the source of org.elasticsearch.Version.jave in elasticsearch-7.0.0-beta1.jar and found  
public static final Version V\_7\_0\_0 = new Version(V\_7\_0\_0\_ID, org.apache.lucene.util.Version.LUCENE\_8\_0\_0);  
at line 126.  
Then I looked up into org.apache.lucene.util.Version.java which I downloaded from [http://lucene.apache.org/core/](http://lucene.apache.org/core/) and found no LUCENE\_8\_0\_0 in it because the latest LUCENE version is 7.7.0

I asked this question on GitHub([https://github.com/elastic/elasticsearch/issues/39387](https://github.com/elastic/elasticsearch/issues/39387)) and got a reply said there is a snapshot of LUCENE 8.0 in elasticsearch-7.0.0-beta1.jar.So, I checked other folders in elasticsearch-7.0.0-beta1.jar and there is no org/apache/lucene/util folder in it.I also checked elasticsearch-7.0.0-alpha2.jar and found nothing.

I am wondering if anyone can help me solve this problem.

---

<div class="post-metadata">

**Author:** ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)\
**Post date:** [February 26, 2019, 10:11am UTC](https://discuss.elastic.co/t/java-lang-nosuchfielderror-lucene-8-0-0/169959/2 "2019-02-26T10:11:00Z")

</div>

The NoSuchField error most likely indicates a problem in your project dependencies. Which version of the Java Rest Client are you using exactly? Did you also add a dependency to Elasticsearch in a specific version?

Cheers

---

<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:** [February 26, 2019, 10:16am UTC](https://discuss.elastic.co/t/java-lang-nosuchfielderror-lucene-8-0-0/169959/3 "2019-02-26T10:16:02Z")

</div>

Did you add the Lucene snapshot repository as the documentation says? See [https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.0/java-rest-high-getting-started-maven.html#java-rest-high-getting-started-maven-lucene](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.0/java-rest-high-getting-started-maven.html#java-rest-high-getting-started-maven-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:** [March 26, 2019, 10:16am UTC](https://discuss.elastic.co/t/java-lang-nosuchfielderror-lucene-8-0-0/169959/4 "2019-03-26T10:16:04Z")

</div>

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