CAS 5.3.3 management failed to save edits

72 views
Skip to first unread message

Yan Zhou

unread,
Oct 8, 2018, 3:43:41 PM10/8/18
to CAS Community
Hello,

CAS 5.3.3 management app is loading service registry in database. That works correctly. But when edit and save, got error.

this is my management.properties. 

mgmt.enableVersionControl=false
mgmt.enableDiscoveryEndpointCall=false
cas.serviceRegistry.initFromJson=false
cas.serviceRegistry.jpa.......

I do not understand why the app. is trying to access directory, when my service registry is in database and I have version control set to false?


2018-10-08 15:28:56,436 DEBUG [org.apereo.cas.mgmt.authentication.CasUserProfileFactory] - <Located CAS user profile [#CasUserProfile# | id: testuser1 | attributes: {credentialType=UsernamePasswordCredential, isFromNewLogin=true, authenticationDate=2018-10-08T15:28:35.293-04:00[America/New_York], authenticationMethod=questAuthHandler, successfulAuthenticationHandlers=questAuthHandler, longTermAuthenticationRequestTokenUsed=false} | roles: [ROLE_ADMIN] | permissions: [] | isRemembered: false | clientName: CasClient | linkedId: null |]>
2018-10-08 15:28:56,436 DEBUG [org.apereo.cas.mgmt.services.web.factory.RepositoryFactory] - <User [#CasUserProfile# | id: testuser1 | attributes: {credentialType=UsernamePasswordCredential, isFromNewLogin=true, authenticationDate=2018-10-08T15:28:35.293-04:00[America/New_York], authenticationMethod=questAuthHandler, successfulAuthenticationHandlers=questAuthHandler, longTermAuthenticationRequestTokenUsed=false} | roles: [ROLE_ADMIN] | permissions: [] | isRemembered: false | clientName: CasClient | linkedId: null |] is not an administrator. Loading objects from master repository>
2018-10-08 15:28:56,438 DEBUG [org.apereo.cas.mgmt.GitUtil] - <Initializing git repository directory at [\etc\cas\services-repo\.git] with strict path checking [on]>
2018-10-08 15:28:59,109 DEBUG [org.apereo.cas.mgmt.GitUtil] - <Attempting to move [ssv-1.json] to [ssv2-1.json]>
2018-10-08 15:28:59,109 DEBUG [org.apereo.cas.mgmt.GitUtil] - <Moving [\etc\cas\services-repo\ssv-1.json] to [\etc\cas\services-repo\ssv2-1.json]>
2018-10-08 15:28:59,111 ERROR [org.apereo.cas.mgmt.services.web.AbstractManagementController] - <\etc\cas\services-repo\ssv-1.json>
java.nio.file.NoSuchFileException: \etc\cas\services-repo\ssv-1.json


Anyway, I tried defining serviceRepo like below, but it fails as well.   I am on windows.

mgmt.servicesRepo=file:///c:/gitworkspace/quest-cas5/cas5-server/etc/cas/services

why does it say Repository not found?

018-10-08 15:41:27,658 DEBUG [org.apereo.cas.mgmt.authentication.CasUserProfileFactory] - <Located CAS user profile [#CasUserProfile# | id: testuser1 | attributes: {credentialType=UsernamePasswordCredential, isFromNewLogin=true, authenticationDate=2018-10-08T15:41:19.484-04:00[America/New_York], authenticationMethod=questAuthHandler, successfulAuthenticationHandlers=questAuthHandler, longTermAuthenticationRequestTokenUsed=false} | roles: [ROLE_ADMIN] | permissions: [] | isRemembered: false | clientName: CasClient | linkedId: null |]>
2018-10-08 15:41:27,658 DEBUG [org.apereo.cas.mgmt.services.web.factory.RepositoryFactory] - <User [#CasUserProfile# | id: testuser1 | attributes: {credentialType=UsernamePasswordCredential, isFromNewLogin=true, authenticationDate=2018-10-08T15:41:19.484-04:00[America/New_York], authenticationMethod=questAuthHandler, successfulAuthenticationHandlers=questAuthHandler, longTermAuthenticationRequestTokenUsed=false} | roles: [ROLE_ADMIN] | permissions: [] | isRemembered: false | clientName: CasClient | linkedId: null |] is not an administrator. Loading objects from master repository>
2018-10-08 15:41:27,658 DEBUG [org.apereo.cas.mgmt.GitUtil] - <Creating git repository directory at [c:\gitworkspace\quest-cas5\cas5-server\etc\cas\services\.git]>
2018-10-08 15:41:27,660 DEBUG [org.apereo.cas.mgmt.GitUtil] - <Initializing git repository directory at [c:\gitworkspace\quest-cas5\cas5-server\etc\cas\services\.git] with strict path checking [on]>
2018-10-08 15:41:30,199 ERROR [org.apereo.cas.mgmt.GitUtil] - <Git repository not found/initialized at [C:\gitworkspace\quest-cas5\cas5-server\etc\cas\services\.git]>
2018-10-08 15:41:30,200 ERROR [org.apereo.cas.mgmt.services.web.AbstractManagementController] - <repository not found: c:\gitworkspace\quest-cas5\cas5-server\etc\cas\services\.git>
java.lang.RuntimeException: repository not found: c:\gitworkspace\quest-cas5\cas5-server\etc\cas\services\.git
at org.apereo.cas.mgmt.GitUtil.initializeGitRepository(GitUtil.java:1225) ~[cas-management-webapp-support-5.3.3.jar:5.3.3]
at org.apereo.cas.mgmt.GitUtil.<init>(GitUtil.java:100) ~[cas-management-webapp-support-5.3.3.jar:5.3.3]
at org.apereo.cas.mgmt.services.web.factory.RepositoryFactory.buildGitUtil(RepositoryFactory.java:81) ~[cas-management-webapp-support-5.3.3.jar:5.3.3]
at org.apereo.cas.mgmt.services.web.factory.RepositoryFactory.masterRepository(RepositoryFactory.java:70) ~[cas-management-webapp-support-5.3.3.jar:5.3.3]
at org.apereo.cas.mgmt.services.web.factory.RepositoryFactory.from(RepositoryFactory.java:53) ~[cas-management-webapp-support-5.3.3.jar:5.3.3]
at org.apereo.cas.mgmt.services.web.factory.RepositoryFactory.from(RepositoryFactory.java:40) ~[cas-management-webapp-support-5.3.3.jar:5.3.3]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]

Thx!
Yan


Travis Schmidt

unread,
Oct 8, 2018, 4:20:48 PM10/8/18
to CAS Community
Not sure about the problem with creating the repository on Windows.  Never tried to run on a windows machine, so maybe someone else can help witnh that.  

As for not being able to save, that is a bug that you have uncovered. If you switch back to only use JPA, you should be able to make edits in any other field besides Service Name.  This will get fixed in the next release for sure and you may be able to use a -SNAPSHOT instance before then.

Travis

--
- 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 cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/ac9f0009-c180-4e3e-b6dc-e83a0aab76d1%40apereo.org.

Travis Schmidt

unread,
Oct 8, 2018, 4:48:50 PM10/8/18
to CAS Community
Try this against 5.3.4-SNAPSHOT
Reply all
Reply to author
Forward
0 new messages