Skip to content

DOCSP-26370: FAQ entry for MongoSecurityException #427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions source/faq.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,28 @@ your classpath, check the following items in your environment:
:ref:`API documentation <java-api-landing>`.


How do I prevent the "com.mongodb.MongoSecurityException" error?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Your application may throw this exception if you attempt to connect to
a MongoDB deployment by specifying invalid or incorrectly formatted credentials.

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 you specified is correct. To learn
how to set up the users and roles for your MongoDB deployment, see
`Manage Users and Roles <https://www.mongodb.com/docs/manual/tutorial/manage-users-and-roles/>`__
in the Server documentation.

How do I prevent the "IllegalArgumentException: Invalid BSON field name" error?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down