Hi cas-users,

We generated a minimal cas-management overlay using
 
curl 
"https://casinit.herokuapp.com/starter.tgz?artifactId=cas&casVersion=6.6.3&commandlineShellSupported=false&dependencies=support-mongo-service-registry&deploymentType=executable&description=WAR%20overlay%20to%20use%20as%20a%20starting%20template%20for%20Apereo%20CAS%20deployments.&dockerSupported=false&githubActionsSupported=false&groupId=org.apereo.cas&helmSupported=false&herokuSupported=false&javaVersion=11&language=java&name=cas&nativeImageSupported=false&packageName=org.apereo&packaging=war&puppeteerSupported=false&type=cas-management-overlay&version=1.0.0";
 
| tar -xzvf -

Setting cas.service-registry.mongo.client-uri=mongodb://localhost/somedb 
in etc/cas/config/management.properties

results in 

Caused by: java.lang.IllegalArgumentException: The connection string is 
invalid. Connection strings must start with either 'mongodb://' or 
'mongodb+srv://
        at com.mongodb.ConnectionString.<init>(ConnectionString.java:303) 
~[mongodb-driver-core-4.7.1.jar!/:?]
        at 
org.apereo.cas.mongo.MongoDbConnectionFactory.mongoDbFactory(MongoDbConnectionFactory.java:191)
 
~[cas-server-support-mongo-core-6.6.0.jar!/:6.6.0]
        at 
org.apereo.cas.mongo.MongoDbConnectionFactory.buildMongoTemplate(MongoDbConnectionFactory.java:287)
 
~[cas-server-support-mongo-core-6.6.0.jar!/:6.6.0]
        at 
org.apereo.cas.config.MongoDbServiceRegistryConfiguration.mongoDbServiceRegistryTemplate(MongoDbServiceRegistryConfiguration.java:50)
 
~[cas-server-support-mongo-service-registry-6.6.0.jar!/:6.6.10]

No matter how we try, the mandatory db config value are never getting bound 
to CasConfigurationProperties. 

But, actually we are able to start cas-management using system properties: 

java -Dcas.service-registry.mongo.client-uri=mongodb://localhost/somedb 
-jar build/libs/cas-management.war

Is this a known problem?

Where and how should cas.service-registry.mongo.client-uri be set using a 
properties file?

Regards

Martin


-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/fad89659-739f-40ea-8e54-fe792b668faan%40apereo.org.

Reply via email to