You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/11/14 05:59:17 UTC
DO NOT REPLY [Bug 37484] New: -
[logging] call to getClassLoader() in LogFactoryImpl not checked for null
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=37484>.
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=37484
Summary: [logging] call to getClassLoader() in LogFactoryImpl not
checked for null
Product: Commons
Version: 1.0.4
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P2
Component: Logging
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: luke.sleeman@ordermate.com.au
In line 374 of LogFactoryImpl.java getClassLoader() is called:
logInterface = this.getClass().getClassLoader().loadClass(LOG_INTERFACE);
However, the docs for getClassLoader() state that some implementations may use
null to return the system classloader. This occurs under CrEme a JVM for the
PocketPC platform which some of our products run under, causing a null pointer
exception. Perhaps it would be better to change line 374 to read:
logClass = loadClass(LOG_INTERFACE);
which seems to solve the problems I have been having. At any rate calls to
getClassLoader() should be checked to ensure that they haven't returned null.
In addition the error that I got:
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException:
java.lang.NullPointerException (Caused by java.lang.NullPointerException)
(Caused by org.apache.commons.logging.LogConfigurationException:
java.lang.NullPointerException (Caused by java.lang.NullPointerException))
Certianly wasnt very helpfull for figuring out what is going on.
- Luke
--
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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org