CAS overlay 5.0.5 does not work.

95 views
Skip to first unread message

Mr. K

unread,
May 15, 2017, 6:59:17 AM5/15/17
to CAS Community

I am using 5.0.5 overlay and attempting to run it as a war in external tomcat but I get an exception. It appears to be related to the logging configuration file, more specifically the logging.config variable in the project and the logging_config variable in the tomcat configuration, they conflict as the project picks up the tomcat one and it crashes on startup.


Exception:

2017-05-12 17:02:03,362 WARN [org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext] - <Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.loggingConfigController': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.io.FileNotFoundException: ServletContext resource [/-Djava.util.logging.config.file="C:/Program Files/Apache Software Foundation/apache-tomcat-8.5.15/conf/logging.properties"] cannot be resolved to URL because it does not exist> 2017-05-12 17:02:03,374 ERROR [org.springframework.boot.SpringApplication] - <Application startup failed> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.loggingConfigController': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.io.FileNotFoundException: ServletContext resource [/-Djava.util.logging.config.file="C:/Program Files/Apache Software Foundation/apache-tomcat-8.5.15/conf/logging.properties"] cannot be resolved to URL because it does not exist


I have tried modifying the logging_config in catalina.bat to a different name and after that it worked but I don't want to do that.


I have searched and it appears other people have had the problem as well and they suggested putting some settings inside bootstrap.properties such as:


spring.profiles.active=native

spring.cloud.config.server.native.searchLocations=file:/etc/cas/config


but that did not work and I got another exception:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration$$EnhancerBySpringCGLIB$$5fe5e3a1]: Constructor threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'configServerHealthIndicator' defined in class path resource [org/springframework/cloud/config/server/config/EnvironmentRepositoryConfiguration.class]: Unsatisfied dependency expressed through method 'configServerHealthIndicator' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'environmentRepository' defined in class path resource [org/springframework/cloud/config/server/config/EnvironmentRepositoryConfiguration$GitRepositoryConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: You need to configure a uri for the git repository


CAS Version: 5.0.5
Apache Tomcat Version: Apache Tomcat/8.5.15
Build Date/Time: 2017-04-21T10:24:20Z
System Temp Directory: C:\Program Files\Apache Software Foundation\apache-tomcat-8.5.15\temp
Java Home: C:\Program Files\Java\jdk1.8.0_65\jre
Java Vendor: Oracle Corporation
Java Version: 1.8.0_65
JCE Installed: no
OS Architecture: amd64
OS Name: Windows 10
OS Version: 10.0


Thanks



Reply all
Reply to author
Forward
0 new messages