# \[No handler for type \[geo\_shape\] declared on field \[mapped\_geo\_shape\]\] AbstractQueryTestCase

**URL:** <https://discuss.elastic.co/t/no-handler-for-type-geo-shape-declared-on-field-mapped-geo-shape-abstractquerytestcase/156851>\
**Category:** Elasticsearch\
**Created:** [November 15, 2018, 12:09pm UTC](https://discuss.elastic.co/t/no-handler-for-type-geo-shape-declared-on-field-mapped-geo-shape-abstractquerytestcase/156851 "2018-11-15T12:09:03Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![vgindin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vgindin/32/42012_2.png) [@vgindin](https://discuss.elastic.co/u/vgindin)\
**Post date:** [November 15, 2018, 12:09pm UTC](https://discuss.elastic.co/t/no-handler-for-type-geo-shape-declared-on-field-mapped-geo-shape-abstractquerytestcase/156851/1 "2018-11-15T12:09:03Z")

</div>

I have a plugin with a custom query and QueryBuilder. I've written the test extending it from **org.elasticsearch.test.AbstractQueryTestCase**. When I'm running it I got the following error:

```
Caused by: MapperParsingException[No handler for type [geo_shape] declared on field [mapped_geo_shape]]
	at org.elasticsearch.index.mapper.ObjectMapper$TypeParser.parseProperties(ObjectMapper.java:274)
	at org.elasticsearch.index.mapper.ObjectMapper$TypeParser.parseObjectOrDocumentTypeProperties(ObjectMapper.java:199)
	at org.elasticsearch.index.mapper.RootObjectMapper$TypeParser.parse(RootObjectMapper.java:131)
	at org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperParser.java:112)
	at org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperParser.java:92)
	at org.elasticsearch.index.mapper.MapperService.internalMerge(MapperService.java:349)
	... 39 more

```

Elasticsearch 6.3.2 (tried also wtih 6.4.3)  
Lucene 7.3.1 (tried also with 7.4.0)

When I updated Elasticsearch version to 6.4.3 - this error gone for the first run. I ran the test again and got this error again. My plugin doesn't operates with geo\_shape type or other types. I've returned to 6.3.2 and first run worked, but the following calls are failed.

I've tried to add dependencies to my pom.xml _com.vididsolutions.jts_ and _spatial4j_ as advised in the that [topic](http://no-handler-for-type-geo-shape-declared-on-field-mapped-geo-shape-in-abstractquery) but it didn't helped.

Any help as appreciated.

---

<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:** [November 26, 2018, 4:05pm UTC](https://discuss.elastic.co/t/no-handler-for-type-geo-shape-declared-on-field-mapped-geo-shape-abstractquerytestcase/156851/2 "2018-11-26T16:05:51Z")

</div>

> [@vgindin](#):
>
> I've tried to add dependencies to my pom.xml _com.vididsolutions.jts_ and _spatial4j_ as advised in the that [topic](http://no-handler-for-type-geo-shape-declared-on-field-mapped-geo-shape-in-abstractquery) but it didn't helped.

Which version did you try to add?

---

<div class="post-metadata">

**Author:** ![vgindin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vgindin/32/42012_2.png) [@vgindin](https://discuss.elastic.co/u/vgindin)\
**Post date:** [November 26, 2018, 5:48pm UTC](https://discuss.elastic.co/t/no-handler-for-type-geo-shape-declared-on-field-mapped-geo-shape-abstractquerytestcase/156851/3 "2018-11-26T17:48:57Z")

</div>

> [@No handler for type \[geo\_shape\] declared on field \[mapped\_geo\_shape\] in AbstractQueryTestCase](https://discuss.elastic.co/t/no-handler-for-type-geo-shape-declared-on-field-mapped-geo-shape-in-abstractquerytestcase/87189/2):
>
> Adding the jts and spatial4j dependencies did the trick for me: \<dependency\> \<groupId\>com.vividsolutions\</groupId\> \<artifactId\>jts\</artifactId\> \<version\>1.13\</version\> \<scope\>test\</scope\> \</dependency\> \<dependency\> \<groupId\>org.locationtech.spatial4j\</groupId\> \<artifactId\>spatial4j\</artifactId\> \<version\>0.6\</version\> \<scope\>test\</scope\> \</dependency\>

1.13 (jts)  
0.6 (spatial4j)

---

<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:** [November 26, 2018, 8:36pm UTC](https://discuss.elastic.co/t/no-handler-for-type-geo-shape-declared-on-field-mapped-geo-shape-abstractquerytestcase/156851/4 "2018-11-26T20:36:30Z")

</div>

> [@vgindin](#):
>
> 1.13 (jts)  
> 0.6 (spatial4j)

These are wrong [versions](https://github.com/elastic/elasticsearch/blob/6.3/buildSrc/version.properties#L5-L6) for 6.3 and 6.4.

---

<div class="post-metadata">

**Author:** ![vgindin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vgindin/32/42012_2.png) [@vgindin](https://discuss.elastic.co/u/vgindin)\
**Post date:** [November 27, 2018, 7:56am UTC](https://discuss.elastic.co/t/no-handler-for-type-geo-shape-declared-on-field-mapped-geo-shape-abstractquerytestcase/156851/5 "2018-11-27T07:56:25Z")

</div>

I've tried 1.15 and 0.7 as specified in versions file for 6.3, 6.4, 6.5. But I got the same error.

Interesting, that com.vividsolutions.jts 1.15.0 is not found in maven repository and I used org.locationtech.jts package.

I don't know, may I should specify this dependency not only in pom.xml?

Intersting, that for ES 6.5 the error happen approximately 1 time from 2, but in earlier version it happen always.

Same error. May I should configure the test in IDEA in some specific way?

---

<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:** [November 27, 2018, 2:56pm UTC](https://discuss.elastic.co/t/no-handler-for-type-geo-shape-declared-on-field-mapped-geo-shape-abstractquerytestcase/156851/6 "2018-11-27T14:56:43Z")

</div>

> Interesting, that com.vividsolutions.jts 1.15.0 is not found in maven repository and I used org.locationtech.jts package.

Yes, the maintainer of the library changed between 1.14 and 1.15

It is hard to tell without seeing how things are configured. Is this plugin open source?

---

<div class="post-metadata">

**Author:** ![vgindin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vgindin/32/42012_2.png) [@vgindin](https://discuss.elastic.co/u/vgindin)\
**Post date:** [December 3, 2018, 1:43pm UTC](https://discuss.elastic.co/t/no-handler-for-type-geo-shape-declared-on-field-mapped-geo-shape-abstractquerytestcase/156851/7 "2018-12-03T13:43:31Z")

</div>

Unfortunately it is not opensource at this moment. I can't show you it, but the error happen before the plugin is initialized. And It is reproduced on just clean project. I've found that jts jar is not downloaded to my repository. I've tried to find it manually: not result. Please have a look:  
[http://central.maven.org/maven2/org/locationtech/jts/jts/1.15.0/](http://central.maven.org/maven2/org/locationtech/jts/jts/1.15.0/)  
[https://oss.sonatype.org/content/repositories/releases/org/locationtech/jts/jts/1.15.0/](https://oss.sonatype.org/content/repositories/releases/org/locationtech/jts/jts/1.15.0/)

There is jts-core found, but jts - isn't.  
I even tried to build it manually, and jts jar is not builded..

Where did you get it?

---

<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:** [December 4, 2018, 2:19pm UTC](https://discuss.elastic.co/t/no-handler-for-type-geo-shape-declared-on-field-mapped-geo-shape-abstractquerytestcase/156851/8 "2018-12-04T14:19:15Z")

</div>

`jts` was renamed to `jts-core` in 1.15. It can be found here [https://oss.sonatype.org/content/repositories/releases/org/locationtech/jts/jts-core/1.15.0/](https://oss.sonatype.org/content/repositories/releases/org/locationtech/jts/jts-core/1.15.0/) and here [http://central.maven.org/maven2/org/locationtech/jts/jts-core/1.15.0/](http://central.maven.org/maven2/org/locationtech/jts/jts-core/1.15.0/)

---

<div class="post-metadata">

**Author:** ![vgindin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vgindin/32/42012_2.png) [@vgindin](https://discuss.elastic.co/u/vgindin)\
**Post date:** [December 4, 2018, 3:02pm UTC](https://discuss.elastic.co/t/no-handler-for-type-geo-shape-declared-on-field-mapped-geo-shape-abstractquerytestcase/156851/9 "2018-12-04T15:02:56Z")

</div>

Now the test is running. Igor, thank you very much!

---

<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:** [January 1, 2019, 3:02pm UTC](https://discuss.elastic.co/t/no-handler-for-type-geo-shape-declared-on-field-mapped-geo-shape-abstractquerytestcase/156851/10 "2019-01-01T15:02:57Z")

</div>

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