logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40212] - NullPointerException in getLogger when called from ShutdownHook
Date Wed, 30 May 2007 22:16:18 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40212>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40212





------- Additional Comments From bayard@apache.org  2007-05-30 15:16 -------
That seems to be at the second of these lines.

  public static Logger getLogger(String name) {
    return repositorySelector.getLoggerRepository().getLogger(name);

So either the repositorySelector is null, or its returning a null
LoggerRepository. If this is always from a shutdown hook (the other reports
don't mention if it's a shutdown hook). setRepositorySelector(..) is never
called, so presumably it's a null from LoggerRepository.

However, DefaultRepositorySelector does not even have an API for removing a
repository once set. That would seem to suggest that the selector was made with
a null LoggerRepository in the first place - but it can't be :)

Nothing Commons-Logging looks like it touches this, so currently I keep
suggesting the NPE can't happen. Need to repeat my steps and see where I screwed up.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message