Array Filters not working in Java Driver

I am trying to use arrayFilter in db.collection.update() API.
The query successfully executes in Mono Compass App but fails when Java driver is used.
This exception is thrown:
java.lang.IllegalArgumentException: Array filters not supported by wire version: 5 at com.mongodb.internal.operation.OperationHelper.validateArrayFilters(

Language: Java, Spring Boot Reactive MongoDB
MongoDB: version 5.0.3 Docker container
OS: Ubuntu 20.04
Docker: Docker Engine - Community 20.10.8

Hi @Sujan_Kumar_Mitra

Wire version 5 means that the driver is connected to a MongoDB 3.4 server, not a 5.0 server. Can you double check your connection string and confirm you’re connected to a 5.0 server?

1 Like