commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 10825] New: - NullPointException when Logger.getClassLoader returns null
Date Mon, 15 Jul 2002 14:11:46 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10825>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10825

NullPointException when Logger.getClassLoader returns null

           Summary: NullPointException when Logger.getClassLoader returns
                    null
           Product: Commons
           Version: Nightly Builds
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Logging
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: ajack@openbiz.biz


getClassLoader can return null to imply the Boot Class Loader (per JDK 1.3 
documentatio at least) however unfortunately commons logging is not coded to 
support that.

There are at least two places where this is a problem & commons logging dies w/ 
a NullPointerException, one in a Hashtable (used as a key to factory) [HashMap 
allows null key, Hashtable does not] and one other more directly.

I modified the code to use the ClassLoader.getSystemClassLoader() when a null 
was returned for Logger.getClassLoader() -- assuming ['cos I had no better 
guess/choice] that System == Boot [since there was no getBootClassLoader.] This 
appears to be working.

I can send my modified code if interested.

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message