CAS Management Services JPA Registry (Success, but Unable to Save to MySQL Database)

691 views
Skip to first unread message

Fahmi L. Ramdhani

unread,
Mar 20, 2019, 8:09:59 AM3/20/19
to CAS Community
Hello,

I am running CAS 5.3.6 and Management Webapp 5.3.6. The point of the problem is not saving to the MySQL Database. This is based on the settings below.

pom.xml (CAS)

<dependencies>
 
<dependency>
 
<groupId>org.apereo.cas</groupId>
 
<artifactId>cas-server-webapp${app.server}</artifactId>
 
<version>${cas.version}</version>
 
<type>war</type>
 
<scope>runtime</scope>
 
</dependency>
 
<dependency>
 
<groupId>org.apereo.cas</groupId>
 
<artifactId>cas-server-support-jdbc</artifactId>
 
<version>${cas.version}</version>
 
</dependency>
 
<dependency>
 
<groupId>org.apereo.cas</groupId>
 
<artifactId>cas-server-support-jdbc-drivers</artifactId>
 
<version>${cas.version}</version>
 
</dependency>
 
<dependency>
 
<groupId>org.apereo.cas</groupId>
 
<artifactId>cas-server-support-jpa-service-registry</artifactId>
 
<version>${cas.version}</version>
 
</dependency>
 
<dependency>
 
<groupId>org.apereo.cas</groupId>
 
<artifactId>cas-server-support-jpa-ticket-registry</artifactId>
 
<version>${cas.version}</version>
 
</dependency>
 
<!--
 <dependency>
 <groupId>org.apereo.cas</groupId>
 <artifactId>cas-server-support-json-service-registry</artifactId>
 <version>${cas.version}</version>
 </dependency>
 -->

 
<dependency>
 
<groupId>org.springframework.security</groupId>
 
<artifactId>spring-security-core</artifactId>
 
<version>5.1.1.RELEASE</version>
 
</dependency>
 
<dependency>
 
<groupId>org.springframework.security</groupId>
 
<artifactId>spring-security-crypto</artifactId>
 
<version>5.1.1.RELEASE</version>
 
</dependency>
 
<dependency>
 
<groupId>org.apereo.cas</groupId>
 
<artifactId>cas-server-support-oauth-webflow</artifactId>
 
<version>${cas.version}</version>
 
</dependency>
</dependencies>

pom.xml (CAS Management)

<dependencies>
 
<dependency>
 
<groupId>org.apereo.cas</groupId>
 
<artifactId>cas-management-webapp</artifactId>
 
<version>${cas-mgmt.version}</version>
 
<type>war</type>
 
</dependency>
</dependencies>

cas.properties (json registry has disabled)

## JSON Service Registry
## ================================================================
## cas.serviceRegistry.json.location = file:/etc/cas/services


## JPA Service Registry
## ================================================================
cas
.serviceRegistry.jpa.url = jdbc:mysql://localhost:3306/registry?useLegacyDatetimeCode=false&serverTimezone=UTC
cas
.serviceRegistry.jpa.user = root
cas
.serviceRegistry.jpa.password = secret
cas
.serviceRegistry.jpa.ddlAuto = create-drop
cas
.serviceRegistry.jpa.driverClass = com.mysql.cj.jdbc.Driver
cas
.serviceRegistry.jpa.dialect = org.hibernate.dialect.MySQL5Dialect

management.properties (CAS Management)

cas.server.name = https://sso.example.com
cas
.server.prefix = ${cas.server.name}/cas


mgmt
.adminRoles[0] = ROLE_ADMIN
mgmt
.userPropertiesFile = file:/etc/cas/config/admusers-management.properties
mgmt
.serverName = https://sso.example.com:8443


server
.context-path=/cas-management
server.port=8443


cas.serviceRegistry.jpa.url = jdbc:mysql:/
/localhost:3306/registry?useLegacyDatetimeCode=false&serverTimezone=UTC
cas
.serviceRegistry.jpa.user = root
cas
.serviceRegistry.jpa.password = secret
cas
.serviceRegistry.jpa.ddlAuto = create-drop
cas
.serviceRegistry.jpa.driverClass = com.mysql.cj.jdbc.Driver
cas
.serviceRegistry.jpa.dialect = org.hibernate.dialect.MySQL5Dialect


ERROR LOG (CAS-MANAGEMENT.LOG)

INFO [org.apereo.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - Audit trail record BEGIN
=============================================================
WHO
: superadmin
WHAT
: AbstractRegisteredService(serviceId=^https:\/\/portal.example.com(\\z|\/.*), name=Portal Example, theme=null, infor...
ACTION
: SAVE_SERVICE_SUCCESS
APPLICATION
: CAS_Management
WHEN
: Wed Mar 20 07:51:01 EDT 2019
CLIENT IP ADDRESS
: 107.121.112.220
SERVER IP ADDRESS
: 172.16.2.53
=============================================================


2019-03-20 07:51:23,411 ERROR [org.apereo.cas.mgmt.services.web.ServiceRepositoryController] - null
java
.lang.NullPointerException: null
at org
.apereo.cas.mgmt.services.web.ServiceRepositoryController.isPublishedBehind(ServiceRepositoryController.java:259) ~[cas-management-webapp-support-5.3.6.jar:5.3.6]
at org
.apereo.cas.mgmt.services.web.ServiceRepositoryController.gitStatus(ServiceRepositoryController.java:331) [cas-management-webapp-support-5.3.6.jar:5.3.6]
at sun
.reflect.GeneratedMethodAccessor368.invoke(Unknown Source) ~[?:?]
at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_191]
at java
.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]
at org
.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97) [spring-webmvc-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) [spring-webmvc-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) [spring-webmvc-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) [spring-webmvc-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967) [spring-webmvc-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) [spring-webmvc-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [spring-webmvc-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) [spring-webmvc-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at javax
.servlet.http.HttpServlet.service(HttpServlet.java:635) [servlet-api.jar:?]
at org
.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [spring-webmvc-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at javax
.servlet.http.HttpServlet.service(HttpServlet.java:742) [servlet-api.jar:?]
at org
.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [catalina.jar:8.5.35]
at org
.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.35]
at org
.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.5.35]
at org
.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.35]
at org
.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.35]
at org
.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55) [spring-boot-1.5.14.RELEASE.jar:1.5.14.RELEASE]


at org
.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.35]
at org
.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.35]
at org
.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.35]
at org
.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.35]
at org
.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.35]
at org
.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.35]
at org
.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106) [spring-boot-actuator-1.5.14.RELEASE.jar:1.5.14.RELEASE]
at org
.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.35]
at org
.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.35]
at org
.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.35]
at org
.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.35]
at org
.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:130) [spring-boot-1.5.14.RELEASE.jar:1.5.14.RELEASE]
at org
.springframework.boot.web.support.ErrorPageFilter.access$000(ErrorPageFilter.java:66) [spring-boot-1.5.14.RELEASE.jar:1.5.14.RELEASE]
at org
.springframework.boot.web.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:105) [spring-boot-1.5.14.RELEASE.jar:1.5.14.RELEASE]
at org
.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:123) [spring-boot-1.5.14.RELEASE.jar:1.5.14.RELEASE]
at org
.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.35]
at org
.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.35]
at org
.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71) [log4j-web-2.11.0.jar:2.11.0]
at org
.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.35]
at org
.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.35]
at org
.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [catalina.jar:8.5.35]
at org
.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:8.5.35]
at org
.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) [catalina.jar:8.5.35]
at org
.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [catalina.jar:8.5.35]
at org
.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [catalina.jar:8.5.35]
at org
.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) [catalina.jar:8.5.35]
at org
.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:685) [catalina.jar:8.5.35]
at org
.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:8.5.35]
at org
.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [catalina.jar:8.5.35]
at org
.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800) [tomcat-coyote.jar:8.5.35]
at org
.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:8.5.35]
at org
.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806) [tomcat-coyote.jar:8.5.35]
at org
.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) [tomcat-coyote.jar:8.5.35]
at org
.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.35]
at java
.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_191]
at java
.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_191]
at org
.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.35]
at java
.lang.Thread.run(Thread.java:748) [?:1.8.0_191]


Can you help me?
Thank you.

Facundo Mateo

unread,
Mar 20, 2019, 10:10:18 AM3/20/19
to CAS Community
Hi Fahmi, 
  We faced the same issue with managment console.  In our case, that error is not related to the database configuration or the saving action itself but the GIT versioning functionalitiy of management console (https://apereo.github.io/cas-management/5.3.x/installation/Installing-ServicesMgmt-Webapp.html#version-control).

  I noticed you have "cas.serviceRegistry.jpa.ddlAuto = create-drop"

  Using that configuration every time the server is stopped your DB schema is dropped and of course your services. 
  Could this be your real issue?

Regards, Facundo

Fahmi L. Ramdhani

unread,
Mar 20, 2019, 11:16:25 AM3/20/19
to CAS Community
Thanks Facundo for your reply. Regarding "cas.serviceRegistry.jpa.ddlAuto = create-drop" is only temporary, next time, I will change it to none or update.

So, when I go to https://sso.example.com/cas-management (successfully), then I make 1 new registry service. I think it will save new data to the MySQL registryDb.RegexRegisteredService table, but the registry service does not add to the table.

The thing that makes me confused is that the registry service that was added was still stored after I closed the browser (private mode). I don't know where the new registry service was stored. Then after I tried accessing the registry service (https://portal.example.com/dashboard redirected to CAS Login), the CAS refused "Application Not Authorized to Use CAS", even though the registry service was added and stored (it doesn't know where it was stored).
 Is there a solution for this problem? Please help. Thank you.

Ray Bon

unread,
Mar 20, 2019, 11:58:00 AM3/20/19
to cas-...@apereo.org
Fahmi,

It sounds like the management server is saving the service to another location, most likely file system since that is default.
Also, make sure that CAS and management server are pointing to the exact same service registry. Check spelling of your properties.

Ray
-- 
Ray Bon
Programmer analyst
Development Services, University Systems
2507218831 | CLE 019 | rb...@uvic.ca

Facundo Mateo

unread,
Mar 20, 2019, 12:01:06 PM3/20/19
to CAS Community
I am assuming you don't have version control enabled.

After you add the service through console, is your service shown in Management console list? If so it should be in your service registry database.
I have the same exception you describe if version control is not enabled but I am still able to save the registry to database. 

May be you could increase console  log level to debug and set "cas.jdbc.showSql=true"  to see whats really happening.


Fahmi L. Ramdhani

unread,
Mar 20, 2019, 5:33:58 PM3/20/19
to CAS Community
Thanks for your replies.

I added the service via CAS Service Manangement (https://sso.example.com/cas-management/manage.html), but it was not saved in the database. Please help review my CAS configuration (in attachment).

Can you help me please. Thank you.
cas.properties
management.properties

Ray Bon

unread,
Mar 20, 2019, 8:12:05 PM3/20/19
to cas-...@apereo.org
Fahmi,

ddlAuto should be set to 'none' or 'update'.
You can also set cas.jdbc.showSql=true to see queries in the logs.
There is also a health query healthQuery='select ...'

Are you running CAS and management server on the same tomcat at the same time or do you shut one down and start the other?
The create-drop will drop the database during tomcat shutdown.

After you create a service, check to see that it is there with mysql command line tool.

This might give some info in the logs:

        <!-- INFO Loaded [#] service(s) from [???ServiceRegistryDAO]
             DEBUG Adding registered service [service URL] -->
        <AsyncLogger name="org.apereo.cas.services.AbstractServicesManager" level="debug" />

Ray

Fahmi L. Ramdhani

unread,
Mar 20, 2019, 11:17:10 PM3/20/19
to CAS Community
Hello Ray, thank for your reply.
I changed the configuration:

- Adding cas.jdbc.showSql=true to cas.properties and management.properties
- Adding healthQuery to cas.properties and management.properties
- Change ddlAuto to update
- Rebuilding project cas and management


Log showing (cas.log)

2019-03-20 22:51:33,260 INFO [org.apereo.cas.services.AbstractServicesManager] - <Loaded [1] service(s) from [JpaServiceRegistry].>
2019-03-20 22:51:43,276 DEBUG [org.apereo.cas.ticket.registry.DefaultTicketRegistryCleaner] - <Attempting to acquire ticket cleanup lock.>
2019-03-20 22:51:43,314 DEBUG [org.apereo.cas.ticket.registry.support.JpaLockingStrategy] - <Creating [cas-ticket-registry-cleaner] lock initially held by [web-01].>
2019-03-20 22:51:43,364 DEBUG [org.apereo.cas.ticket.registry.DefaultTicketRegistryCleaner] - <Acquired lock. Proceeding with cleanup.>
2019-03-20 22:51:43,378 DEBUG [org.apereo.cas.ticket.DefaultTicketCatalog] - <Located all registered and known sorted ticket definitions [[DefaultTicketDefinition(implementationClass=class org.apereo.cas.ticket.ServiceTicketImpl, prefix=ST, properties=DefaultTicketDefinitionProperties(cascade=false, storageName=null, storageTimeout=0, storagePassword=null), order=-2147483648), DefaultTicketDefinition(implementationClass=class org.apereo.cas.ticket.ProxyTicketImpl, prefix=PT, properties=DefaultTicketDefinitionProperties(cascade=false, storageName=null, storageTimeout=0, storagePassword=null), order=-2147483648), DefaultTicketDefinition(implementationClass=class org.apereo.cas.ticket.TicketGrantingTicketImpl, prefix=TGT, properties=DefaultTicketDefinitionProperties(cascade=true, storageName=null, storageTimeout=0, storagePassword=null), order=2147483647), DefaultTicketDefinition(implementationClass=class org.apereo.cas.ticket.refreshtoken.RefreshTokenImpl, prefix=RT, properties=DefaultTicketDefinitionProperties(cascade=false, storageName=oauthRefreshTokensCache, storageTimeout=2592000, storagePassword=null), order=2147483647), DefaultTicketDefinition(implementationClass=class org.apereo.cas.ticket.accesstoken.AccessTokenImpl, prefix=AT, properties=DefaultTicketDefinitionProperties(cascade=false, storageName=oauthAccessTokensCache, storageTimeout=28800, storagePassword=null), order=2147483647), DefaultTicketDefinition(implementationClass=class org.apereo.cas.ticket.TransientSessionTicketImpl, prefix=TST, properties=DefaultTicketDefinitionProperties(cascade=false, storageName=null, storageTimeout=0, storagePassword=null), order=2147483647), DefaultTicketDefinition(implementationClass=class org.apereo.cas.ticket.code.OAuthCodeImpl, prefix=OC, properties=DefaultTicketDefinitionProperties(cascade=false, storageName=oauthCodesCache, storageTimeout=30, storagePassword=null), order=2147483647), DefaultTicketDefinition(implementationClass=class org.apereo.cas.ticket.ProxyGrantingTicketImpl, prefix=PGT, properties=DefaultTicketDefinitionProperties(cascade=true, storageName=null, storageTimeout=0, storagePassword=null), order=2147483647)]]>

1. Adding 2 initial service registry using MySQL Workbench
2. I am login successfully to Services Management (screen shoot in attachment).
3. I am try to add an service registry, then save it.
4. Successfully added an service registry, but it is not stored in the database.
5. The table still displays 2 rows (not 3 rows, 1 added in service management)

Log show (cas-management.log, not showing SQL QUERIES)

============================================================= WHO: superadmin WHAT: AbstractRegisteredService(serviceId=^https:\/\/portal.example.com(\\z|\/.*), name=Asia, theme=null, informationU... ACTION: SAVE_SERVICE_SUCCESS APPLICATION: CAS_Management WHEN: Wed Mar 20 23:03:24 EDT 2019 CLIENT IP ADDRESS: 103.xxx.1x8.xxx SERVER IP ADDRESS: 172.16.2.53 =============================================================


2019-03-20 23:04:04,149 ERROR [org.apereo.cas.mgmt.GitUtil] - Git repository not found/initialized at [/etc/cas/services-repo/.git]
2019-03-20 23:04:04,149 ERROR [org.apereo.cas.mgmt.services.web.ServiceRepositoryController] - repository not found: /etc/cas/services-repo/.git
java
.lang.RuntimeException: repository not found: /etc/cas/services-repo/.git
at org
.apereo.cas.mgmt.GitUtil.initializeGitRepository(GitUtil.java:1225) ~[cas-management-webapp-support-5.3.6.jar:5.3.6]
at org
.apereo.cas.mgmt.GitUtil.<init>(GitUtil.java:100) ~[cas-management-webapp-support-5.3.6.jar:5.3.6]
at org
.apereo.cas.mgmt.services.web.factory.RepositoryFactory.buildGitUtil(RepositoryFactory.java:81) ~[cas-management-webapp-support-5.3.6.jar:5.3.6]
at org
.apereo.cas.mgmt.services.web.factory.RepositoryFactory.masterRepository(RepositoryFactory.java:70) ~[cas-management-webapp-support-5.3.6.jar:5.3.6]
at org
.apereo.cas.mgmt.services.web.factory.RepositoryFactory.from(RepositoryFactory.java:53) ~[cas-management-webapp-support-5.3.6.jar:5.3.6]
at org
.apereo.cas.mgmt.services.web.factory.RepositoryFactory.from(RepositoryFactory.java:40) ~[cas-management-webapp-support-5.3.6.jar:5.3.6]
at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_191]

at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_191]
at java
.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]

at org
.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:216) ~[spring-core-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.springframework.cloud.context.scope.GenericScope$LockedScopedProxyFactoryBean.invoke(GenericScope.java:470) ~[spring-cloud-context-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org
.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.18.RELEASE.jar:4.3.18.RELEASE]
at org
.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:671) ~[spring-aop-4.3.18.RELEASE.jar:4.3.18.RELEASE]
at org
.apereo.cas.mgmt.services.web.factory.RepositoryFactory$$EnhancerBySpringCGLIB$$892cee48.from(<generated>) ~[cas-management-webapp-support-5.3.6.jar:5.3.6]
at org
.apereo.cas.mgmt.services.web.ServiceRepositoryController.gitStatus(ServiceRepositoryController.java:322) [cas-management-webapp-support-5.3.6.jar:5.3.6]
at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_191]

at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_191]
at java
.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]

at org
.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) [spring-web-4.3.18.RELEASE.jar:4.3.18.RELEASE]
at org
.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) [spring-web-4.3.18.RELEASE.jar:4.3.18.RELEASE]

at org
.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97) [spring-webmvc-4.3.17.RELEASE.jar:4.3.17.RELEASE]
at org
.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) [spring-webmvc-4.3.17.RELEASE.jar:4.3.17.RELEASE]

I set ddlAuto = create-drop because it knows the table structure used by CAS. Or is there another way to find out the structure of the table? Now I change it to update.
Yes, I run a server and management on the same server.

I don't understand about this problem. Log displays do not match the configuration. Can someone solve this problem?
Thank you.

Pada Kamis, 21 Maret 2019 07.12.05 UTC+7, rbon menulis:
Fahmi,

ddlAuto should be set to 'none' or 'update'.
You can also set cas.jdbc.showSql=true to see queries in the logs.
There is also a health query healthQuery='select ...'

Are you running CAS and management server on the same tomcat at the same time or do you shut one down and start the other?
The create-drop will drop the database during tomcat shutdown.

After you create a service, check to see that it is there with mysql command line tool.

This might give some info in the logs:

        <!-- INFO Loaded [#] service(s) from [???ServiceRegistryDAO]
             DEBUG Adding registered service [service URL] -->
        <AsyncLogger name="org.apereo.cas.services.AbstractServicesManager" level="debug" />

Ray

-- 
Ray Bon
Programmer analyst
Development Services, University Systems
2507218831 | CLE 019 | rb...@uvic.ca

Fahmi L. Ramdhani

unread,
Mar 20, 2019, 11:21:34 PM3/20/19
to CAS Community
Sorry, i am forget attachment.
Strange, I added a service in service management, saved. But there is no database. But in service management appear. Where is the new service stored?
1. Services Management Added.PNG
1. Services Management.PNG
3. RegexRegisteredService.PNG

Ray Bon

unread,
Mar 21, 2019, 12:12:56 PM3/21/19
to cas-...@apereo.org
Fahmi,

create-drop is used during initial development of a jpa project when database design might change regularly. Once database is set, then it gets changed to update. There is a create option but it will result in errors if the database already exists. create can be used once and then changed to update.

Check catalina.out for logs.

CAS is picking up one entry from the database. It reloads every 2 minutes. Does it show 2 entries when you add one manually?

Are the null values in the workbench image from the cas-management created entry?

Ray

Fahmi L. Ramdhani

unread,
Mar 22, 2019, 4:27:49 AM3/22/19
to CAS Community
This problem has been Solved.
I am forget to insert dependency to pom.xml in  management project.

<dependency>
 
<groupId>org.apereo.cas</groupId>
 
<artifactId>cas-server-support-jdbc-drivers</artifactId>
 
<version>${cas.version}</version>
</dependency>
<dependency>
 
<groupId>org.apereo.cas</groupId>
 
<artifactId>cas-server-support-jpa-service-registry</artifactId>
 
<version>${cas.version}</version>
</dependency>


Thank you all.
Reply all
Reply to author
Forward
0 new messages