diff --git a/source/faq.txt b/source/faq.txt index f75c6b776..db7a7f087 100644 --- a/source/faq.txt +++ b/source/faq.txt @@ -171,10 +171,32 @@ your classpath, check the following items in your environment: :ref:`API documentation `. +How do I prevent the "com.mongodb.MongoSecurityException" error? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Your application might throw this exception if you specify invalid or +incorrectly formatted credentials when connecting to a MongoDB deployment. + +If you receive this error when you attempt to connect to a MongoDB deployment, +check the following items in your code: + +- The connection URI corresponds to the correct MongoDB deployment. + To learn more about setting your connection URI, see :ref:`connection-uri`. + +- The credentials for the authentication mechanism that you specified are + correct. To learn how to specify your credentials, see the + :ref:`authentication-mechanisms` and :ref:`enterprise-authentication-mechanisms` + guides. + +- The name of the authentication database that you specified is correct. To + learn how to set up the users and roles for your MongoDB deployment, see + `Manage Users and Roles `__ + in the Server documentation. + How do I prevent the "IllegalArgumentException: Invalid BSON field name" error? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Your application may throw this exception if you pass an incorrectly formatted +Your application might throw this exception if you pass an incorrectly formatted document to an operation and you are using a driver version v4.7 or earlier. .. note::