Skip to content

Commit 64a70d5

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 5359059 commit 64a70d5

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
@@ -176,10 +176,32 @@ your classpath, check the following items in your environment:
176176
:ref:`API documentation <java-api-landing>`.
177177

178178

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

182-
Your application may throw this exception if you pass an incorrectly formatted
204+
Your application might throw this exception if you pass an incorrectly formatted
183205
document to an operation and you are using a driver version v4.7 or earlier.
184206

185207
.. note::

0 commit comments

Comments
 (0)