[Bug 164] New: NPE on LoggerFactory.singleImplementationSanityCheck

http://bugzilla.slf4j.org/show_bug.cgi?id=164 Summary: NPE on LoggerFactory.singleImplementationSanityCheck Product: SLF4J Version: 1.5.x Platform: PC OS/Version: Linux Status: NEW Severity: major Priority: P1 Component: Core API AssignedTo: slf4j-dev@qos.ch ReportedBy: joakim.erdfelt@gmail.com This occurs on slf4j-api 1.5.7 and 1.5.8 when using logback 0.9.18 It does not occur on slf4j-api 1.5.6 Note: the environment being used has various java.endorsed.dirs setup where the logging is initialized. This being not very normal, it could be the reason for this NPE, as I believe LoggerFactory.class.getClassLoader() will return null in this scenario. java.lang.NullPointerException at org.slf4j.LoggerFactory.singleImplementationSanityCheck(LoggerFactory.java:192) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:113) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:269) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242) at org.eclipse.jetty.util.log.Slf4jLog.<init>(Slf4jLog.java:33) at org.eclipse.jetty.util.log.Slf4jLog.<init>(Slf4jLog.java:28) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.

http://bugzilla.slf4j.org/show_bug.cgi?id=164 Hugues Malphettes <hmalphettes@intalio.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hmalphettes@intalio.com -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.

http://bugzilla.slf4j.org/show_bug.cgi?id=164 Ceki Gulcu <lists@slf4j.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |critical Status|NEW |ASSIGNED --- Comment #1 from Ceki Gulcu <lists@slf4j.org> 2010-03-31 11:45:22 --- Code in question: 190 private static void singleImplementationSanityCheck() { 191 try { 192 Enumeration paths = LoggerFactory.class.getClassLoader().getResources( 193 STATIC_LOGGER_BINDER_PATH); -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.

http://bugzilla.slf4j.org/show_bug.cgi?id=164 Ceki Gulcu <lists@slf4j.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #2 from Ceki Gulcu <lists@slf4j.org> 2010-04-04 22:23:57 --- This problem was already fixed in SLF4J 1.5.10 (see bug 146). However, the information provided in this report permits an even better fix. Fixed in http://github.com/ceki/slf4j/commit/40e51c6d8ce73c -- Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@pixie.qos.ch