MongoDB Atlas spring boot X.509 certificate based connection issue

I am trying to connect MongoDB from a Spring Boot application using an X.509 certificate downloaded from the MongoDB Atlas site. I have placed the .**pem** file in the resource directory. Additionally, I have added the following URI to the file:

However, when I attempt to perform any operation, I receive the following error message:

 Command failed with error 8000 (AtlasError): 'certificate validation failed' on server

I have also tried connecting to the database using a username and password, and in that case, I am able to connect and access the database successfully. I would appreciate your guidance on resolving this issue.

Hi @janarthanan_s

The Java driver doesn’t support the tlsCertificateKeyFile query parameter. You have to add the certificate to the system key store. See for details.