Logback throws NP Exception when trying to use groovy configuration file.
-------------------------------------------------------------------------
Key: LBCLASSIC-270
URL: http://jira.qos.ch/browse/LBCLASSIC-270
Project: logback-classic
Issue Type: Bug
Components: Other
Affects Versions: 0.9.29
Environment: Has been verifed on both Linux and Windows and Oracle
"standard" JVM and Oracle JRockit.
slf4j-api.jar logback-classic.jar and logback-core.jar should be in
%JRE_HOME%/lib/endorsed folder
Start applikation with -Dlogback.configurationFile=<somewhere>/logback.groovy
Reporter: Nicolai Marck Ă˜dum
Assignee: Logback dev list
If logback jars (logback-claaic and logback-core) are located in endorsed
libraries ( -Djava.endorsed.dirs) its not possible to use a logback
configuration url that ends with groovy.
This is because of line 23 in ch.qos.logback.classic.util.EnvUtil
ClassLoader classLoader = EnvUtil.class.getClassLoader();
witch return null if called from endorsed libraries.
It should work if you change it to
ClassLoader classLoader = EnvUtil.class.getClassLoader();
if (classLoader == null)
classLoader = ClassLoader.getSystemClassLoader();
I have not been able to verify this fix since I am not able to build logback :-(
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
logback-dev mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-dev