Why I set spring.cloud.config.server.native.searchLocations=D:\\
cas-overlay-template-master\\etc\\cas\\config
Still get same error
my bootstrap.properties:
##
# CAS Spring Cloud Config Client
#
# Name of the application for which environment settings and properties should
be fetched.
# This should map to a cas.yml or cas.properties file.
spring.application.name=cas
spring.cloud.config.fail-fast=true
##
# CAS Embedded Cloud Config Server
#
# Native profile in the Config Server that doesn't use Git, but just loads the
# config files from the local classpath or file system.
#
spring.profiles.active=native
spring.cloud.config.server.native.searchLocations=D:\\cas-overlay-template-master\\etc\\cas\\config
# D:\\cas-overlay-template-master\\etc\\cas\\config
# spring.profiles.active=default
# spring.cloud.config.server.git.uri=https://github.com/repoName/config
# spring.cloud.config.server.git.uri=file://${user.home}/config
# spring.cloud.config.server.git.username=
# spring.cloud.config.server.git.password=
spring.cloud.config.server.bootstrap=true
spring.cloud.config.server.prefix=/configserver
spring.jmx.default-domain=server
在 2016年12月1日星期四 UTC+8下午11:06:58,Yauheni Sidarenka写道:
>
> I had this problem running CAS 5.0.0 and 5RCs in external Tomcat container
> using Windows OS.
>
> The problem is that one of Tomcat's .BAT-files (maybe catalina.bat, I
> cannot recall) has line something like
>
> set LOGGING_CONFIG=blah-blah
>
> and then when Spring is looking for "logging.config" property it is
> "smart" enough to consider mentioned LOGGING_CONFIG as desired
> logging.config.
>
> I added line (you may set any path to your logging config for CAS, but I
> am satisfied with the default file):
>
> logging.config=classpath:log4j2.xml
>
> to cas.properties file which is by default should be placed in
> file:///etc/cas/config
> directory, but again you may control this location by
> spring.cloud.config.server.native.searchLocations property setting it in
> bootstrap.properties file (as I did) or via command line argument
> starting from -- (but I did not try):
>
> --spring.cloud.config.server.native.searchLocations=whatever_you_wish
>
> So, this problem disappeared.
>
> By the may, placing logging.config property in application.properties
> file inside CAS war file didn't help me.
>
> Regards, Yauheni.
>
> On Thursday, December 1, 2016 at 5:30:43 PM UTC+3, Kira Vu wrote:
>>
>> I have same problem in 5.1.0-SNAPSHOT
>>
>> Vào 05:30:00 UTC+7 Thứ Tư, ngày 16 tháng 11 năm 2016, satnam đã viết:
>>>
>>> Hello,
>>>
>>> we are trying to upgrade cas from 4.2.x to 5.0.x and getting error that
>>> -Djava.util.logging.config.file=C:\Projects\PASS5\trunk\test\apache-tomcat\cat_base\conf\logging.properties
>>>
>>> file not found. The logging.properties file does exist at location. Is
>>> there something we need to include?
>>>
>>>
>>>
>>> 2016-11-15 14:21:40,329 WARN
>>> [org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration]
>>>
>>> - <Logging config file location
>>> '-Djava.util.logging.config.file="C:\Projects\PASS5\trunk\test\apache-tomcat\cat_base\conf\logging.properties"'
>>>
>>> cannot be opened and will be ignored>
>>>
>>> Caused by: java.lang.RuntimeException: java.io.FileNotFoundException:
>>> ServletContext resource
>>> [/-Djava.util.logging.config.file="C:/Projects/PASS5/trunk/test/apache-tomcat/cat_base/conf/logging.properties"]
>>>
>>> cannot be resolved to URL because it does not exist
>>> at com.google.common.base.Throwables.propagate(Throwables.java:160)
>>> at
>>> org.apereo.cas.web.report.LoggingConfigController.initialize(LoggingConfigController.java:85)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>> at java.lang.reflect.Method.invoke(Unknown Source)
>>> at
>>> org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:365)
>>> at
>>> org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:310)
>>> at
>>> org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
>>> ... 45 more
>>> Caused by: java.io.FileNotFoundException: ServletContext resource
>>> [/-Djava.util.logging.config.file="C:/Projects/PASS5/trunk/test/apache-tomcat/cat_base/conf/logging.properties"]
>>>
>>> cannot be resolved to URL because it does not exist
>>> at
>>> org.springframework.web.context.support.ServletContextResource.getURL(ServletContextResource.java:156)
>>> at
>>> org.springframework.core.io.AbstractResource.getURI(AbstractResource.java:99)
>>> at
>>> org.apereo.cas.web.report.LoggingConfigController.initialize(LoggingConfigController.java:81)
>>>
>>>
>>> Thanks for help
>>>
>>
--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
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 view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/defa2beb-b78e-403c-86e6-3e50f4139e8d%40apereo.org.