You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed the instruction on Readme in distro/docker-compose folder, first keycloak starts in http://localhost:8080 instead of http://localhost:8090. Also microcks did not start due to missing environment variables.
microcks | 05:04:14.419 WARN 1 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jobController': Unsatisfied dependency expressed through field 'jobRepository'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'importJobRepositoryImpl': Unsatisfied dependency expressed through field 'template'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mongoTemplate' defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDatabaseFactoryDependentConfiguration.class]: Unsatisfied dependency expressed through method 'mongoTemplate' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mongoDatabaseFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDatabaseFactoryConfiguration.class]: Unsatisfied dependency expressed through method 'mongoDatabaseFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongo' defined in class path resource [org/springframework/boot/autoconfigure/mongo/MongoAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mongodb.client.MongoClient]: Factory method 'mongo' threw exception; nested exception is java.lang.IllegalArgumentException: The connection string is invalid. Connection strings must start with either 'mongodb://' or 'mongodb+srv://
microcks | 05:04:14.557 ERROR 1 --- [ main] o.s.boot.SpringApplication : Application run failed
The text was updated successfully, but these errors were encountered:
The error message indicates that there is an issue with the MongoDB connection string. MongoDB connection strings must start with either 'mongodb://' or 'mongodb+srv://'.
To solve this error, you need to ensure that the MongoDB connection string in your application's configuration is correctly formatted. Here are some steps you can take:
Check Connection String Format: Ensure that the MongoDB connection string starts with either 'mongodb://' or 'mongodb+srv://'.
Configuration Files: Look for any configuration files in your project that contain the MongoDB connection string. This is typically found in properties or YAML files (application.properties or application.yml).
Environment Variables: If you're using environment variables to store configuration, double-check that the MongoDB connection string is correctly set.
Database Configuration Class: If you're configuring the MongoDB connection programmatically, make sure that the connection string is constructed correctly.
Here's an example of how a MongoDB connection string should look:
Replace <username>, <password>, and mydatabase with your actual credentials and database name.
Once you've corrected the connection string, restart your application and see if the error persists. If it does, there may be another issue with the MongoDB configuration that needs to be addressed.
I followed the instruction on Readme in distro/docker-compose folder, first keycloak starts in http://localhost:8080 instead of http://localhost:8090. Also microcks did not start due to missing environment variables.
The text was updated successfully, but these errors were encountered: