[logback-dev] [Bug 68] New: classloader for loading autoConfig configuration resource

bugzilla-daemon at pixie.qos.ch bugzilla-daemon at pixie.qos.ch
Fri Apr 20 15:21:20 CEST 2007


http://bugzilla.qos.ch/show_bug.cgi?id=68

           Summary: classloader for loading autoConfig configuration
                    resource
           Product: logback-core
           Version: unspecified
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: Other
        AssignedTo: logback-dev at qos.ch
        ReportedBy: Filip.Jirsak at gmail.com


ContextInitializer.autoConfig(LoggerContext) uses current thread context
ClassLoader (TCL) nowadays - it calls
Thread.currentThread().getContextClassLoader(). Sometimes this classloader has
no access to logback classes - for example TCL is parent of classloader, which
loaded current class, in oc4j (Oracle J2EE container) at the time of starting
servlet container. So logback-*.jar are in WEB-INF/lib directory, but TCL has
no access to these jars and to files in WEB-INF/classes.

I think ContextInitializer.autoConfig(LoggerContext) should try
this.getClass().getClassLoader() first and only if it fails it should use
Thread.currentThread().getContextClassLoader().


-- 
Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the logback-dev mailing list