# After Migrating from ES 6.6 to 6.7 getting below runtime error

**URL:** <https://discuss.elastic.co/t/after-migrating-from-es-6-6-to-6-7-getting-below-runtime-error/174776>\
**Category:** Elasticsearch\
**Created:** [April 1, 2019, 11:56am UTC](https://discuss.elastic.co/t/after-migrating-from-es-6-6-to-6-7-getting-below-runtime-error/174776 "2019-04-01T11:56:26Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yashpal\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yashpal_singh/32/43209_2.png) [@Yashpal\_Singh](https://discuss.elastic.co/u/Yashpal_Singh)\
**Post date:** [April 1, 2019, 11:56am UTC](https://discuss.elastic.co/t/after-migrating-from-es-6-6-to-6-7-getting-below-runtime-error/174776/1 "2019-04-01T11:56:26Z")

</div>

We are trying to Migrate ES from 6.6 to 6.7 and got the below exception on runtime.

```
java.lang.NoSuchFieldError: LUCENE_6_4_1
	at org.elasticsearch.Version.<clinit>(Version.java:76) ~[elasticsearch-6.7.0.jar!/:6.7.0]
	at org.elasticsearch.common.logging.DeprecationLogger.<clinit>(DeprecationLogger.java:144) ~[elasticsearch-6.7.0.jar!/:6.7.0]
```

---

<div class="post-metadata">

**Author:** ![HenningAndersen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/henningandersen/32/48188_2.png) [@HenningAndersen](https://discuss.elastic.co/u/HenningAndersen)\
**Post date:** [April 1, 2019, 12:41pm UTC](https://discuss.elastic.co/t/after-migrating-from-es-6-6-to-6-7-getting-below-runtime-error/174776/2 "2019-04-01T12:41:25Z")

</div>

Hi @Yashpal_Singh,

this sounds like a problem with the installation (lucene core out of sync with elasticsearch). Which platform are you running this on and using which installation method (linux tar vs. rpm vs. docker etc.)?

You can likely check the version of the jar by using:

```auto
unzip -p lib/lucene-core-* META-INF/MANIFEST.MF | less

```

in addition to just looking at the filename.

---

<div class="post-metadata">

**Author:** ![Yashpal\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yashpal_singh/32/43209_2.png) [@Yashpal\_Singh](https://discuss.elastic.co/u/Yashpal_Singh)\
**Post date:** [April 2, 2019, 3:14am UTC](https://discuss.elastic.co/t/after-migrating-from-es-6-6-to-6-7-getting-below-runtime-error/174776/3 "2019-04-02T03:14:35Z")

</div>

Hi Henning,

Thanks for quick response, We are running our spring-boot project on Ubuntu OS.

Maven Dependency:

```
  <dependency>
        <groupId>org.elasticsearch</groupId>
        <artifactId>elasticsearch</artifactId>
        <version>6.6.0</version>
    </dependency>

```

Have plot the maven dependency tree, checked the version of Lucene and it seems correct.  
`org.apache.lucene:lucene-core:jar:7.7.0`

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [April 2, 2019, 5:22am UTC](https://discuss.elastic.co/t/after-migrating-from-es-6-6-to-6-7-getting-below-runtime-error/174776/4 "2019-04-02T05:22:42Z")

</div>

> [@Yashpal\_Singh](#):
>
> \<version\>6.6.0\</version\>

Your previous post indicated you are migrating to ES 6.7, why are you depending on 6.6.0 ?

---

<div class="post-metadata">

**Author:** ![Yashpal\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yashpal_singh/32/43209_2.png) [@Yashpal\_Singh](https://discuss.elastic.co/u/Yashpal_Singh)\
**Post date:** [April 2, 2019, 6:48am UTC](https://discuss.elastic.co/t/after-migrating-from-es-6-6-to-6-7-getting-below-runtime-error/174776/5 "2019-04-02T06:48:25Z")

</div>

Hi Tim,

My bad, Have pasted the old dependency.

Updated dependency.

```
 <dependency>
    <groupId>org.elasticsearch</groupId>
    <artifactId>elasticsearch</artifactId>
    <version>6.7.0</version>
</dependency>
```

---

<div class="post-metadata">

**Author:** ![HenningAndersen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/henningandersen/32/48188_2.png) [@HenningAndersen](https://discuss.elastic.co/u/HenningAndersen)\
**Post date:** [April 8, 2019, 6:58am UTC](https://discuss.elastic.co/t/after-migrating-from-es-6-6-to-6-7-getting-below-runtime-error/174776/6 "2019-04-08T06:58:17Z")

</div>

Hi @Yashpal_Singh,

I think we need a slightly deeper understanding of this to come to a resolution. A few questions:

1. Is this a client program using the elasticsearch transport protocol or are you embedding the elasticsearch service into your program?
2. The exception shown above, does that occur while starting the elasticsearch server or a client program?
3. Not sure exactly how spring boot does class loading, but would it be possible to find out if any part of your application has another org.apache.lucene.util.Version version?
4. Would it be possible to share the full stack trace?

---

<div class="post-metadata">

**Author:** ![Yashpal\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yashpal_singh/32/43209_2.png) [@Yashpal\_Singh](https://discuss.elastic.co/u/Yashpal_Singh)\
**Post date:** [April 8, 2019, 9:22am UTC](https://discuss.elastic.co/t/after-migrating-from-es-6-6-to-6-7-getting-below-runtime-error/174776/7 "2019-04-08T09:22:03Z")

</div>

@HenningAndersen Please find my reply inline.

> 1. Is this a client program using the elasticsearch transport protocol or are you embedding the elasticsearch service into your program?

_Yes its a client code, using elasticsearch high level REST client_

> 1. The exception shown above, does that occur while starting the elasticsearch server or a client program?

_We got the above exception while creating elasticsearch query using Queriesbuilder, Please note that service bootup was successful._

> 1. Not sure exactly how spring boot does class loading, but would it be possible to find out if any part of your application has another org.apache.lucene.util.Version version?

_I Have plot the mvn dependency tree, I didn't get lucene-core dependency from any other source._

> 1. Would it be possible to share the full stack trace?

java.lang.NoSuchFieldError: LUCENE\_6\_4\_1  
at org.elasticsearch.Version.(Version.java:76) ~[elasticsearch-6.7.0.jar!/:6.7.0]  
at org.elasticsearch.common.logging.DeprecationLogger.(DeprecationLogger.java:144) ~[elasticsearch-6.7.0.jar!/:6.7.0]  
at org.elasticsearch.search.builder.SearchSourceBuilder.(SearchSourceBuilder.java:81) ~[elasticsearch-6.7.0.jar!/:6.7.0]  
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0\_92-internal]

```
Please note that we got above Exception when creating an object of SearchSourceBuilder.java class

def searchSourcebuilder = new SearchSourceBuilder()

```

---

<div class="post-metadata">

**Author:** ![HenningAndersen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/henningandersen/32/48188_2.png) [@HenningAndersen](https://discuss.elastic.co/u/HenningAndersen)\
**Post date:** [April 8, 2019, 9:36am UTC](https://discuss.elastic.co/t/after-migrating-from-es-6-6-to-6-7-getting-below-runtime-error/174776/8 "2019-04-08T09:36:39Z")

</div>

Hi @Yashpal_Singh,

let us try to double check that the actual lucene jar in use has that field, using:

```auto
javap -cp lucene-core-7.7.0.jar org.apache.lucene.util.Version

```

---

<div class="post-metadata">

**Author:** ![Yashpal\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yashpal_singh/32/43209_2.png) [@Yashpal\_Singh](https://discuss.elastic.co/u/Yashpal_Singh)\
**Post date:** [April 8, 2019, 9:58am UTC](https://discuss.elastic.co/t/after-migrating-from-es-6-6-to-6-7-getting-below-runtime-error/174776/9 "2019-04-08T09:58:16Z")

</div>

> public final class org.apache.lucene.util.Version {  
> public static final org.apache.lucene.util.Version LUCENE\_6\_0\_0;  
> public static final org.apache.lucene.util.Version LUCENE\_6\_0\_1;  
> public static final org.apache.lucene.util.Version LUCENE\_6\_1\_0;  
> public static final org.apache.lucene.util.Version LUCENE\_6\_2\_0;  
> public static final org.apache.lucene.util.Version LUCENE\_6\_2\_1;  
> public static final org.apache.lucene.util.Version LUCENE\_6\_3\_0;  
> public static final org.apache.lucene.util.Version LUCENE\_6\_4\_0;  
> public static final org.apache.lucene.util.Version LUCENE\_6\_4\_1;  
> public static final org.apache.lucene.util.Version LUCENE\_6\_4\_2;  
> public static final org.apache.lucene.util.Version LUCENE\_6\_5\_0;  
> public static final org.apache.lucene.util.Version LUCENE\_6\_5\_1;  
> public static final org.apache.lucene.util.Version LUCENE\_6\_6\_0;  
> public static final org.apache.lucene.util.Version LUCENE\_6\_6\_1;  
> public static final org.apache.lucene.util.Version LUCENE\_6\_6\_2;  
> public static final org.apache.lucene.util.Version LUCENE\_6\_6\_3;  
> public static final org.apache.lucene.util.Version LUCENE\_6\_6\_4;  
> public static final org.apache.lucene.util.Version LUCENE\_6\_6\_5;  
> public static final org.apache.lucene.util.Version LUCENE\_7\_0\_0;  
> public static final org.apache.lucene.util.Version LUCENE\_7\_0\_1;  
> public static final org.apache.lucene.util.Version LUCENE\_7\_1\_0;  
> public static final org.apache.lucene.util.Version LUCENE\_7\_2\_0;  
> public static final org.apache.lucene.util.Version LUCENE\_7\_2\_1;  
> public static final org.apache.lucene.util.Version LUCENE\_7\_3\_0;  
> public static final org.apache.lucene.util.Version LUCENE\_7\_3\_1;  
> public static final org.apache.lucene.util.Version LUCENE\_7\_4\_0;  
> public static final org.apache.lucene.util.Version LUCENE\_7\_5\_0;  
> public static final org.apache.lucene.util.Version LUCENE\_7\_6\_0;  
> public static final org.apache.lucene.util.Version LUCENE\_7\_7\_0;  
> public static final org.apache.lucene.util.Version LATEST;  
> public static final org.apache.lucene.util.Version LUCENE\_CURRENT;  
> public final int major;  
> public final int minor;  
> public final int bugfix;  
> public final int prerelease;  
> static final boolean $assertionsDisabled;  
> public static org.apache.lucene.util.Version parse(java.lang.String) throws java.text.ParseException;  
> public static org.apache.lucene.util.Version parseLeniently(java.lang.String) throws java.text.ParseException;  
> public static org.apache.lucene.util.Version fromBits(int, int, int);  
> public boolean onOrAfter(org.apache.lucene.util.Version);  
> public java.lang.String toString();  
> public boolean equals(java.lang.Object);  
> public int hashCode();  
> static {};  
> }

---

<div class="post-metadata">

**Author:** ![HenningAndersen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/henningandersen/32/48188_2.png) [@HenningAndersen](https://discuss.elastic.co/u/HenningAndersen)\
**Post date:** [April 8, 2019, 10:07am UTC](https://discuss.elastic.co/t/after-migrating-from-es-6-6-to-6-7-getting-below-runtime-error/174776/10 "2019-04-08T10:07:20Z")

</div>

Hi @Yashpal_Singh,

that looks fine. It looks like it somehow picked up another version of `org.apache.lucene.util.Version`.

I think the easiest route to find the cause is to use a debugger and break inside `org.elasticsearch.Version` and then examine the class loader in use to find out where the class is taken from.

Alternatively, it could make sense to setup a mini-example demonstrating the issue and share it here.

---

<div class="post-metadata">

**Author:** ![Yashpal\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yashpal_singh/32/43209_2.png) [@Yashpal\_Singh](https://discuss.elastic.co/u/Yashpal_Singh)\
**Post date:** [April 8, 2019, 10:08am UTC](https://discuss.elastic.co/t/after-migrating-from-es-6-6-to-6-7-getting-below-runtime-error/174776/11 "2019-04-08T10:08:49Z")

</div>

Hi Henning,

Thanks for the help, will try to dig deeper in our applicaiton dependencies 🙂

---

<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:** [May 6, 2019, 10:08am UTC](https://discuss.elastic.co/t/after-migrating-from-es-6-6-to-6-7-getting-below-runtime-error/174776/12 "2019-05-06T10:08:55Z")

</div>

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