commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r377199 - /jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java
Date Sun, 12 Feb 2006 16:28:34 GMT
Author: rdonkin
Date: Sun Feb 12 08:28:32 2006
New Revision: 377199

URL: http://svn.apache.org/viewcvs?rev=377199&view=rev
Log:
Print classloader details when the class loaded is incompatible. Added comment suggesting
fix.

Modified:
    jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java

Modified: jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java?rev=377199&r1=377198&r2=377199&view=diff
==============================================================================
--- jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java
(original)
+++ jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java
Sun Feb 12 08:28:32 2006
@@ -997,11 +997,23 @@
                             "Loaded class " + logFactoryClass.getName()
                             + " from classloader " + objectId(classLoader));
                     } else {
+                        //
+                        // This indicates a problem with the ClassLoader tree.
+                        // An incompatible ClassLoader was used to load the 
+                        // implementation. 
+                        // As the same classes
+                        // must be available in multiple class loaders,
+                        // it is very likely that multiple JCL jars are present.
+                        // The most likely fix for this
+                        // problem is to remove the extra JCL jars from the 
+                        // ClassLoader hierarchy. 
+                        // 
                         logDiagnostic(
                             "Factory class " + logFactoryClass.getName()
                             + " loaded from classloader " + objectId(classLoader)
                             + " does not extend '" + LogFactory.class.getName()
                             + "' as loaded by this classloader.");
+                        logHierarchy("[BAD CL TREE] ", classLoader);
                     }
                     
                     return (LogFactory) logFactoryClass.newInstance();



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


Mime
View raw message