[No handler for type [geo_shape] declared on field [mapped_geo_shape]] AbstractQueryTestCase


(Vadim Gindin) #1

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 but it didn't helped.

Any help as appreciated.


(Igor Motov) #2

Which version did you try to add?


(Vadim Gindin) #3

1.13 (jts)
0.6 (spatial4j)


(Igor Motov) #4

These are wrong versions for 6.3 and 6.4.


(Vadim Gindin) #5

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?


(Igor Motov) #6

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?


(Vadim Gindin) #7

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/
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?


(Igor Motov) #8

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/ and here http://central.maven.org/maven2/org/locationtech/jts/jts-core/1.15.0/


(Vadim Gindin) #9

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