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
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