There was a binary breaking change in 4.0 to the insertOne method. It previously returned void, and in 4.0 it was changed to return an InsertOneResult.

Make sure you recompile your application from source and don’t just drop in the 5.1 jar files after compiling against 3.12.8. Otherwise, linking will fail in the way that you describe above.

Regards,
Jeff