Skip to content

Commit aba6efa

Browse files
author
Chris Cho
committed
DOCSP-26370: FAQ entry for MongoSecurityException (#427)
* DOCSP-26370: FAQ entry for MongoSecurityException (cherry picked from commit 1b0a35e)
1 parent 0eb18b8 commit aba6efa

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

source/faq.txt

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,32 @@ your classpath, check the following items in your environment:
171171
:ref:`API documentation <java-api-landing>`.
172172

173173

174+
How do I prevent the "com.mongodb.MongoSecurityException" error?
175+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
176+
177+
Your application might throw this exception if you specify invalid or
178+
incorrectly formatted credentials when connecting to a MongoDB deployment.
179+
180+
If you receive this error when you attempt to connect to a MongoDB deployment,
181+
check the following items in your code:
182+
183+
- The connection URI corresponds to the correct MongoDB deployment.
184+
To learn more about setting your connection URI, see :ref:`connection-uri`.
185+
186+
- The credentials for the authentication mechanism that you specified are
187+
correct. To learn how to specify your credentials, see the
188+
:ref:`authentication-mechanisms` and :ref:`enterprise-authentication-mechanisms`
189+
guides.
190+
191+
- The name of the authentication database that you specified is correct. To
192+
learn how to set up the users and roles for your MongoDB deployment, see
193+
`Manage Users and Roles <https://www.mongodb.com/docs/manual/tutorial/manage-users-and-roles/>`__
194+
in the Server documentation.
195+
174196
How do I prevent the "IllegalArgumentException: Invalid BSON field name" error?
175197
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
176198

177-
Your application may throw this exception if you pass an incorrectly formatted
199+
Your application might throw this exception if you pass an incorrectly formatted
178200
document to an operation and you are using a driver version v4.7 or earlier.
179201

180202
.. note::

0 commit comments

Comments
 (0)