Skip to content

AOT Repositories Aggregation pipeline parsing fails with JsonParseException #5018

Open
@mp911de

Description

@mp911de

Running an AOT-implemented aggregation containing a $-escaped sequence fails with JsonParseException

@Aggregation("{ $group : { _id : $customerId, total : { $sum : 1 } } }")
List<OrdersPerCustomer> totalOrdersPerCustomer(Sort sort);
org.bson.json.JsonParseException: JSON reader was expecting a value but found '$customerId'.
	at org.bson.json.JsonReader.readBsonType(JsonReader.java:262) ~[bson-5.5.1.jar!/:na]
	at org.bson.codecs.DocumentCodec.decode(DocumentCodec.java:174) ~[bson-5.5.1.jar!/:na]
	at org.bson.codecs.DocumentCodec.decode(DocumentCodec.java:44) ~[bson-5.5.1.jar!/:na]
	at org.bson.internal.LazyCodec.decode(LazyCodec.java:53) ~[bson-5.5.1.jar!/:na]
	at org.bson.codecs.ContainerCodecHelper.readValue(ContainerCodecHelper.java:60) ~[bson-5.5.1.jar!/:na]
	at org.bson.codecs.DocumentCodec.decode(DocumentCodec.java:176) ~[bson-5.5.1.jar!/:na]
	at org.bson.codecs.DocumentCodec.decode(DocumentCodec.java:44) ~[bson-5.5.1.jar!/:na]
	at org.bson.Document.parse(Document.java:129) ~[bson-5.5.1.jar!/:na]
	at org.bson.Document.parse(Document.java:114) ~[bson-5.5.1.jar!/:na]
	at com.example.data.mongodb.OrderRepositoryImpl__Aot.totalOrdersPerCustomer(OrderRepositoryImpl__Aot.java:133) ~[!/:na]

Metadata

Metadata

Assignees

Labels

theme: aotAn issue related to Ahead-Of-Time processingtype: blockerAn issue that is blocking us from releasingtype: bugA general bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions