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] - NullPointException when Logger.getClassLoader returns null
Date Wed, 17 Jul 2002 22:16:11 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





------- Additional Comments From rsitze@apache.org  2002-07-17 22:16 -------
Take a look at commons.discovery.  This will eventually replace the factory 
code in logging (at least that's my intent), so I'm going to assume that you 
would like the problem fixed there also :-)

Anyway, take a look at the class BootstrapLoader.  I'd appreciate someone with 
a JDK 1.1.x environ putting together a test-case for this loader and verifying 
that it does what's expected.  It SHOULD build in earlier JVM's, and function 
as you specified.  For JDK 1.2 we could use a similar mechanism to get directly 
to the bootstrap loader, but that code wouldn't build in JDK 1.1.x... so I 
think your proposed solution + portable code is going to be about as good as it 
gets.  Thanks for the proposed solution.

BTW, IF you have time, it would be great if you used 'discovery' directly in 
your environment to get the LogFactory.  This would verify for me that I've 
solved your problem and haven't introduced another...

Use the following to get the LogFactory (note properties are protected, so I've 
put literals here):

 (LogFactory)ServiceFinder.find(LogFactory.class,
                                LogFactory.class,
                 "org.apache.commons.logging.impl.LogFactoryImpl",
                 "commons-logging.properties");

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