[logback-dev] [JIRA] Commented: (LBCORE-18) classloader for loading autoConfig configuration resource

Paul Nyheim (JIRA) noreply-jira at qos.ch
Wed Nov 12 10:35:23 CET 2008


    [ http://jira.qos.ch/browse/LBCORE-18?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10899#action_10899 ] 

Paul Nyheim commented on LBCORE-18:
-----------------------------------

What is the status of this blocking issue? 

> classloader for loading autoConfig configuration resource
> ---------------------------------------------------------
>
>                 Key: LBCORE-18
>                 URL: http://jira.qos.ch/browse/LBCORE-18
>             Project: logback-core
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: unspecified
>         Environment: Operating System: Windows
> Platform: PC
>            Reporter: Filip Jirsák
>            Assignee: Logback dev list
>            Priority: Blocker
>         Attachments: classloader.patch
>
>
> 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().

-- 
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

       


More information about the logback-dev mailing list