I figured out what is causing this. In cas-server-webapp's
src/main/resources/application.properties I had the following:
spring.profiles.active=native
spring.cloud.config.server.native.searchLocations=file:/etc/cas/config
In /etc/cas/config/cas.properties I had the following set:
cas.serviceRegistry.config.location=file:///etc/cas/services
This means my service registry is going to be outside the cas-server-webapp
in /etc/cas/services. Since my service registry was outside of
cas-server-webapp, I removed cas-server-webapp's
src/main/resources/services directory.
I had included cas-server-support-json-service-registry in build.gradle of
cas-server-webapp. On startup this
causes org.apereo.cas.config.JsonServiceRegistryConfiguration to read the
service registry out of /etc/cas/services.
The stack trace for this call is:
...
at java.lang.Thread.dumpStack(Thread.java:1329)
at
org.apereo.cas.util.ResourceUtils.prepareClasspathResourceIfNeeded(ResourceUtils.java:101)
at
org.apereo.cas.services.AbstractResourceBasedServiceRegistryDao.<init>(AbstractResourceBasedServiceRegistryDao.java:87)
at
org.apereo.cas.services.JsonServiceRegistryDao.<init>(JsonServiceRegistryDao.java:85)
at
org.apereo.cas.config.JsonServiceRegistryConfiguration.jsonServiceRegistryDao(JsonServiceRegistryConfiguration.java:35)
at
org.apereo.cas.config.JsonServiceRegistryConfiguration$$EnhancerBySpringCGLIB$$20284df4.CGLIB$jsonServiceRegistryDao$0(<generated>)
at
org.apereo.cas.config.JsonServiceRegistryConfiguration$$EnhancerBySpringCGLIB$$20284df4$$FastClassBySpringCGLIB$$39729d3a.invoke(<generated>)
at
org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at
org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
at
org.apereo.cas.config.JsonServiceRegistryConfiguration$$EnhancerBySpringCGLIB$$20284df4.jsonServiceRegistryDao(<generated>)
...
So far so good. Then, org.apereo.cas.config.CasCoreServicesConfiguration
tries to find the service registry. Unfortunately, this class does not
know that you have a service registry outside of cas-server-webapp and
tries to look for it in cas-server-webapp/src/main/resources/services which
was deleted. The stack trace for this call looks like:
...
at java.lang.Thread.dumpStack(Thread.java:1329)
at
org.apereo.cas.util.ResourceUtils.prepareClasspathResourceIfNeeded(ResourceUtils.java:101)
at
org.apereo.cas.services.AbstractResourceBasedServiceRegistryDao.<init>(AbstractResourceBasedServiceRegistryDao.java:87)
at
org.apereo.cas.config.CasCoreServicesConfiguration$EmbeddedServiceRegistryDao.<init>(CasCoreServicesConfiguration.java:156)
at
org.apereo.cas.config.CasCoreServicesConfiguration.embeddedJsonServiceRegistry(CasCoreServicesConfiguration.java:136)
at
org.apereo.cas.config.CasCoreServicesConfiguration$$EnhancerBySpringCGLIB$$b86386ec.CGLIB$embeddedJsonServiceRegistry$8(<generated>)
at
org.apereo.cas.config.CasCoreServicesConfiguration$$EnhancerBySpringCGLIB$$b86386ec$$FastClassBySpringCGLIB$$665effef.invoke(<generated>)
at
org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at
org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
at
org.apereo.cas.config.CasCoreServicesConfiguration$$EnhancerBySpringCGLIB$$b86386ec.embeddedJsonServiceRegistry(<generated>)
...
To fix this just do not delete the services folder out of
cas-server-webapp/src/main/resources.
Hope that helps someone.
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/.
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/f5421d52-9bfa-421a-bc28-041ac53cf0a2%40apereo.org.
For more options, visit https://groups.google.com/a/apereo.org/d/optout.