I am seeing this error when I try to write data to mongodb.
com.mongodb.commandFailureException: err msg: Bson field ‘authenticate.nonce’ is an unknown field. Code 40415
public void writeToMongo(BasicDBObject data){
MongoCredential credential = MongoCredential.createMongoCRCredential(username, dbName, pwd);
MongoClient client = new MongoClient(new ServerAddress(hostIp,port, Arrays.asList(credential)));
database= client.getDB(dbName);
collection= database.getCollection(“nameTable”);
collection.save(data);
}
Anyone could help?