You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.
When the spring configuration location is specified as a file: URL if it isn't found then it causes an error. classpath: URLs fail gracefully because Spring's ResourceUtils.getURL() throws a FileNotFoundException when the classpath URL can't be resolved. In contrast File URLs only cause that exception when they are invalid as both a URL and as a filepath (something that I was unable to do on a Mac running Java 8, perhaps windows is different).
File URLs should fail gracefully to allow the multiple configuration logic to behave properly, just like they do for classpath URLs.
Caused by: ch.qos.logback.core.joran.spi.JoranException: Could not open URL [file:/Users/foo/bar/logback.xml].
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
at ch.qos.logback.ext.spring.LogbackConfigurer.initLogging(Unknown Source)
... 94 more
Caused by: java.io.FileNotFoundException: /Users/foo/bar/logback.xml (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:48)
... 96 more
The text was updated successfully, but these errors were encountered:
jgibson
added a commit
to jgibson/logback-extensions
that referenced
this issue
Feb 16, 2016
When the spring configuration location is specified as a file: URL if it isn't found then it causes an error. classpath: URLs fail gracefully because Spring's
ResourceUtils.getURL()
throws a FileNotFoundException when the classpath URL can't be resolved. In contrast File URLs only cause that exception when they are invalid as both a URL and as a filepath (something that I was unable to do on a Mac running Java 8, perhaps windows is different).File URLs should fail gracefully to allow the multiple configuration logic to behave properly, just like they do for classpath URLs.
The text was updated successfully, but these errors were encountered: