Hello, I have this error when i want to connect me to a mongoDB database.
This code worked fine with a simple java class but not when i implement it into a plugin.
public void connectBdd() {
System.out.println("Connecting to BDD");
String connectionString = "mongodb+srv://<user><pwd>@throughthetimeless.5e0sk.mongodb.net/?retryWrites=true&w=majority&appName=ThroughTheTimeless";
MongoClient mongoClient = MongoClients.create(connectionString);
}
(<user> and <pwd> are hidden).
This code worked fine with a simple java class but not when i implement it into a plugin.
public void connectBdd() {
System.out.println("Connecting to BDD");
String connectionString = "mongodb+srv://<user><pwd>@throughthetimeless.5e0sk.mongodb.net/?retryWrites=true&w=majority&appName=ThroughTheTimeless";
MongoClient mongoClient = MongoClients.create(connectionString);
}
(<user> and <pwd> are hidden).
- Version Output
- 1.21