java.lang.NoSuchFieldError: LUCENE_8_0_0

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.

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

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 which I downloaded from and found no LUCENE_8_0_0 in it because the latest LUCENE version is 7.7.0

I asked this question on GitHub( 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.

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?


Did you add the Lucene snapshot repository as the documentation says? See

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