# Could not initialize GeoHashGridAggregationBuilder for elastic search 7.8.0

**URL:** <https://discuss.elastic.co/t/could-not-initialize-geohashgridaggregationbuilder-for-elastic-search-7-8-0/240102>\
**Category:** Elasticsearch\
**Created:** [July 7, 2020, 7:21am UTC](https://discuss.elastic.co/t/could-not-initialize-geohashgridaggregationbuilder-for-elastic-search-7-8-0/240102 "2020-07-07T07:21:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayse](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@ayse](https://discuss.elastic.co/u/ayse)\
**Post date:** [July 7, 2020, 7:21am UTC](https://discuss.elastic.co/t/could-not-initialize-geohashgridaggregationbuilder-for-elastic-search-7-8-0/240102/1 "2020-07-07T07:21:17Z")

</div>

Hello,

I upgraded Elastic search version to 7.8.0. When I call ElasticSearchAPI I faced with "Caused By: java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.search.aggregations.bucket.geogrid.GeoHashGridAggregationBuilder" but when I check this file in jar I can see. Does anybody faced with such an issue could you please help me?

Thank you

---

<div class="post-metadata">

**Author:** ![Ignacio\_Vera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ignacio_vera/32/36674_2.png) [@Ignacio\_Vera](https://discuss.elastic.co/u/Ignacio_Vera)\
**Post date:** [July 7, 2020, 12:56pm UTC](https://discuss.elastic.co/t/could-not-initialize-geohashgridaggregationbuilder-for-elastic-search-7-8-0/240102/2 "2020-07-07T12:56:09Z")

</div>

Hi @ayse,

Could share the stack trace of the error and a snippet of the code you are trying to run? Those errors mean most of the time some issues with your dependencies.

---

<div class="post-metadata">

**Author:** ![ayse](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@ayse](https://discuss.elastic.co/u/ayse)\
**Post date:** [July 8, 2020, 1:32pm UTC](https://discuss.elastic.co/t/could-not-initialize-geohashgridaggregationbuilder-for-elastic-search-7-8-0/240102/3 "2020-07-08T13:32:52Z")

</div>

> [@ayse](#):
>
> Could not initialize class org.elasticsearch.search.aggregations.bucket.geogrid.GeoHashGridAggregationBuilder

Hi Ignacio,

"Root cause of ServletException.  
org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.search.aggregations.bucket.geogrid.GeoHashGridAggregationBuilder"

You can see my dependencies as below

````
               ```
                     <dependency>
				        <groupId>org.elasticsearch</groupId>
				        <artifactId>elasticsearch</artifactId>
				        <version>7.8.0</version>
			         </dependency>
                     <dependency>
                        <groupId>org.elasticsearch.client</groupId>
                        <artifactId>x-pack-transport</artifactId>
                        <version>7.8.0</version>
                     </dependency>
		             <dependency>
				        <groupId>org.elasticsearch.client</groupId>
				        <artifactId>elasticsearch-rest-client</artifactId>
				        <version>7.8.0</version>
			         </dependency>
			         <dependency>
				        <groupId>org.elasticsearch.client</groupId>
				        <artifactId>elasticsearch-rest-high-level-client</artifactId>
				        <version>7.8.0</version>
			         </dependency>
			         <dependency>
                        <groupId>org.elasticsearch</groupId>
                        <artifactId>elasticsearch-geo</artifactId>
                        <version>7.8.0</version>
                      </dependency> 
       ```

````

---

<div class="post-metadata">

**Author:** ![Ignacio\_Vera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ignacio_vera/32/36674_2.png) [@Ignacio\_Vera](https://discuss.elastic.co/u/Ignacio_Vera)\
**Post date:** [July 8, 2020, 2:34pm UTC](https://discuss.elastic.co/t/could-not-initialize-geohashgridaggregationbuilder-for-elastic-search-7-8-0/240102/4 "2020-07-08T14:34:35Z")

</div>

> [@ayse](#):
>
> ```auto
> <dependency>
> <groupId>org.elasticsearch.client</groupId>
> <artifactId>x-pack-transport</artifactId>
> <version>7.8.0</version>
> </dependency>
> 
> ```

This dependency does not exist, it might be the problem.

---

<div class="post-metadata">

**Author:** ![ayse](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@ayse](https://discuss.elastic.co/u/ayse)\
**Post date:** [July 9, 2020, 8:47am UTC](https://discuss.elastic.co/t/could-not-initialize-geohashgridaggregationbuilder-for-elastic-search-7-8-0/240102/5 "2020-07-09T08:47:57Z")

</div>

I think it is not about it because I used this for 7.6.2 version like this and also in the website it is explained like [https://www.elastic.co/guide/en/elasticsearch/reference/7.8/setup-xpack-client.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.8/setup-xpack-client.html)

---

<div class="post-metadata">

**Author:** ![Ignacio\_Vera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ignacio_vera/32/36674_2.png) [@Ignacio\_Vera](https://discuss.elastic.co/u/Ignacio_Vera)\
**Post date:** [July 9, 2020, 11:44am UTC](https://discuss.elastic.co/t/could-not-initialize-geohashgridaggregationbuilder-for-elastic-search-7-8-0/240102/6 "2020-07-09T11:44:23Z")

</div>

Yes, you are right if you set properly the repository. I tried myself creating a small project and I did not have any issues, so not sure I can help much more there.

My suspicion is that the issue is related to how dependencies are treated in the framework you are using and not elasticsearch.

---

<div class="post-metadata">

**Author:** ![ayse](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@ayse](https://discuss.elastic.co/u/ayse)\
**Post date:** [July 9, 2020, 12:12pm UTC](https://discuss.elastic.co/t/could-not-initialize-geohashgridaggregationbuilder-for-elastic-search-7-8-0/240102/7 "2020-07-09T12:12:18Z")

</div>

@Ignacio_Vera Thank you for your response. I am trying to use this version with weblogic server can the problem be related to it? Should I add anything to pom.xml for it?

---

<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:** [August 6, 2020, 12:12pm UTC](https://discuss.elastic.co/t/could-not-initialize-geohashgridaggregationbuilder-for-elastic-search-7-8-0/240102/8 "2020-08-06T12:12:21Z")

</div>

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