Exception in thread "main" java.lang.NoSuchMethodError: 'com.mongodb.internal.connection.Cluster com.mongodb.internal.connection.DefaultClusterFactory.createCluster(com

Hi All,
I have a long struggle fixing this issue.

While running an spring boot application connection to Mongo DB client I am getting the following error “Exception in thread “main” java.lang.NoSuchMethodError: 'com.mongodb.internal.connection.Cluster com.mongodb.internal.connection.DefaultClusterFactory.createCluster(com)”

Tried few option like changing the driver in pom.xml etc. but still no luck

Any suggestion on how to fix this please?

Hi @Manikandan_Veeraraghavan and welcome to the community forum :star2:

In order to help you further, could you share the details of the pom.xml file for your application?

Also, is this the first time you are facing the issue? If not, could you also help me understand modifications that have been made to the code due to which the error has occurred.

Best Regards
Aasawari