Open
Description
I'm trying to use MongoDB Mobile for GeoJSON data. Unfortunately, this does not seem to work out of the box. If I try to find
a document based on a nearSphere
query, I get this error:
org.bson.codecs.configuration.CodecConfigurationException: Can't find a codec for class com.mongodb.client.model.geojson.Point.
at org.bson.codecs.configuration.CodecCache.getOrThrow(CodecCache.java:46)
at org.bson.codecs.configuration.ProvidersCodecRegistry.get(ProvidersCodecRegistry.java:63)
at org.bson.codecs.configuration.ProvidersCodecRegistry.get(ProvidersCodecRegistry.java:37)
at com.mongodb.client.model.BuildersHelper.encodeValue(BuildersHelper.java:37)
at com.mongodb.client.model.Filters$GeometryOperatorFilter.toBsonDocument(Filters.java:1209)
at com.mongodb.internal.operation.Operations.createFindOperation(Operations.java:142)
at com.mongodb.internal.operation.Operations.findFirst(Operations.java:125)
at com.mongodb.internal.operation.SyncOperations.findFirst(SyncOperations.java:80)
at com.mongodb.client.internal.FindIterableImpl.first(FindIterableImpl.java:199)
How can this codec be set-up?
Metadata
Metadata
Assignees
Labels
No labels