I'm trying to connect to AWS DocumentDB from java application. I think I'm able to connect to cluster, not sure... Because earlier I was getting connection timeout and now I'm not. But now I'm getting the below error
java file
MongoClient mongoClient = new MongoClient(clientURI);
DB db = mongoClient.getDB("giftRegistry");
System.out.println(db);
System.out.println(db.isAuthenticated());
CommandResult commandResult = db.getStats();
System.out.println(commandResult);
Getting error in CommandResult line.
Error
com.mongodb.CommandFailureException: { "serverUsed" : "giftregistry-db.c3ekl0nftuic.us-east-2.docdb.amazonaws.com:27017" , "ok" : 0 , "errmsg" : "Unsupported mechanism" , "code" : 301}
Googled up this, but found nothing.
If there is someone who can help, that would be appreciated..!!
DB db = mongoClient.getDB("giftRgistry")might begiftRegistry?? is that typo or the reason of the error?