-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Milestone
Description
Maksym opened DATAMONGO-2476 and commented
An issue while parsing a json query specified for a method used in Repository.
@Repository
public interface EntityRepo extends ReactiveMongoRepository<Entity, String> {
@Query(value = "{ 'name' : { $in : [?0] } }")
Flux<Entity> findEntities(String name);
}
Error:
Caused by: org.bson.json.JsonParseException: JSON reader was expecting a value but found '}'.
at org.springframework.data.mongodb.util.json.ParameterBindingJsonReader.readBsonType(ParameterBindingJsonReader.java:327) ~[spring-data-mongodb-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.data.mongodb.util.json.ParameterBindingDocumentCodec.readList(ParameterBindingDocumentCodec.java:318) ~[spring-data-mongodb-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.data.mongodb.util.json.ParameterBindingDocumentCodec.readValue(ParameterBindingDocumentCodec.java:297) ~[spring-data-mongodb-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.data.mongodb.util.json.ParameterBindingDocumentCodec.decode(ParameterBindingDocumentCodec.java:195) ~[spring-data-mongodb-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.data.mongodb.util.json.ParameterBindingDocumentCodec.decode(ParameterBindingDocumentCodec.java:61) ~[spring-data-mongodb-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.data.mongodb.util.json.ParameterBindingDocumentCodec.readValue(ParameterBindingDocumentCodec.java:311) ~[spring-data-mongodb-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.data.mongodb.util.json.ParameterBindingDocumentCodec.decode(ParameterBindingDocumentCodec.java:195) ~[spring-data-mongodb-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.data.mongodb.util.json.ParameterBindingDocumentCodec.decode(ParameterBindingDocumentCodec.java:175) ~[spring-data-mongodb-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.data.mongodb.repository.query.ReactiveStringBasedMongoQuery.createQuery(ReactiveStringBasedMongoQuery.java:122) ~[spring-data-mongodb-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.data.mongodb.repository.query.AbstractReactiveMongoQuery.doExecute(AbstractReactiveMongoQuery.java:147) ~[spring-data-mongodb-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.data.mongodb.repository.query.AbstractReactiveMongoQuery.execute(AbstractReactiveMongoQuery.java:132) ~[spring-data-mongodb-2.2.4.RELEASE.jar:2.2.4.RELEASE]
at org.springframework.data.mongodb.repository.query.AbstractReactiveMongoQuery.execute(AbstractReactiveMongoQuery.java:104) ~[spring-data-mongodb-2.2.4.RELEASE.jar:2.2.4.RELEASE]
Affects: 2.2.4 (Moore SR4)
Referenced from: pull request #835
Backported to: 2.2.5 (Moore SR5)