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/05/09 10:26:34 UTC

DO NOT REPLY [Bug 10825] - NullPointException when Logger.getClassLoader returns 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=10825>.
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=10825


e.vogelsinger@mobilkom.at changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




------- Additional Comments From e.vogelsinger@mobilkom.at  2005-05-09 10:26 -------
Hithere,

using commons logging 1.0.4 this bug seems to be (again? still?) in production, 
see code snippet below, lines 374/375. As soon as you have the commons in your 
bootstrap classpath you're doomed, as "this.getClass().getClassLoader()" will 
return null (JVM 1.4.2).

// from LogFactoryImpl.java
360:   protected Constructor getLogConstructor()
361:        throws LogConfigurationException {
362:
363:        // Return the previously identified Constructor (if any)
364:        if (logConstructor != null) {
365:            return logConstructor;
366:        }
367:
368:        String logClassName = getLogClassName();
369:
370:        // Attempt to load the Log implementation class
371:        Class logClass = null;
372:        Class logInterface = null;
373:        try {
374:            logInterface = this.getClass().getClassLoader().loadClass
375:                (LOG_INTERFACE);

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))
	at org.apache.commons.logging.impl.LogFactoryImpl.newInstance
(LogFactoryImpl.java:543)
	at org.apache.commons.logging.impl.LogFactoryImpl.getInstance
(LogFactoryImpl.java:235)
	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:370)
	at org.apache.commons.digester.Digester.<init>(Digester.java:346)
	at Main.main(Main.java:53)
Caused by: org.apache.commons.logging.LogConfigurationException: 
java.lang.NullPointerException (Caused by java.lang.NullPointerException)
	at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor
(LogFactoryImpl.java:397)
	at org.apache.commons.logging.impl.LogFactoryImpl.newInstance
(LogFactoryImpl.java:529)
	... 4 more
Caused by: java.lang.NullPointerException
	at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor
(LogFactoryImpl.java:374)
	... 5 more
Exception in thread "main" 

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