Mongo Atlas Serverless and SpringBoot v2.7.3

Hi there,
I’m currently experiencing some issue trying to connect to my Mongo Atlas Serverless Cluster through a Spring Boot application.
I’ve seen that the version 2.5 of spring boot was not compatible due to outdated mongo-java driver.
Therefore I upgraded the project to version 2.7.3 hopping that would solve the connection issue, but it seems that the problem persists.
In the maven central repository there is not other version of the mongo-java-driver that 3.11.12 Maven Central Repository Search

The error message reported is the following one

Caused by: com.mongodb.MongoConfigurationException: A TXT record is only permitted to contain the keys [authsource, replicaset], but the TXT record for '' contains the keys [loadbalanced, authsource]

Thanks in advance for your guidance :slight_smile:

Hi! The most recent Java driver release is 4.8.2. You can find more details here. This section of the documentation may prove useful to you as well.

Thank you @Ashni_Mehta, I’ve also realise that I was using the legacy mongo java driver dependency org.mongodb:mongo-java-driver and should have switched to org.mongodb:mongodb-driver-sync

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.