logback fails to initialise when loaded from bootstrap classpath
----------------------------------------------------------------

                 Key: LBGENERAL-30
                 URL: http://jira.qos.ch/browse/LBGENERAL-30
             Project: logback-general
          Issue Type: Bug
    Affects Versions: 0.9.14, 0.9.15
            Reporter: Henric Larsson
            Assignee: Logback dev list
         Attachments: classloader.patch

When logback is put in the endorsed library path of the jdk, it fails to 
initialise because the getClassLoader() call returns null in a couple of places.

Returning null is expected when  the classloader is the bootstrap classloader, 
as is the case when logback is loaded from the endorsed directory.

Here's a snippet from the sun jdk javadoc for Class.getClassLoader()

"Returns the class loader for the class.  Some implementations may use null to 
represent the bootstrap class loader. This method will return null in such 
implementations if this class was loaded by the bootstrap class loader."


I'm using jacorb 2.3.1, which uses slf4j-api 1.5.6. Jacorb is required to be in 
the endorsed lib to work, and hence any logging implementation has to go there 
too.

I patched my logback instance to return the system classloader when the null 
classloader is encounterd.

Attaching patch.

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

Reply via email to