commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Sanders" <>
Subject [LOGGING] ClassLoader Problems
Date Mon, 22 Apr 2002 16:48:54 GMT
Hi all,

I am working on vindico, a replacement for Alexandria over in the
Alexandria CVS, and I am using commons-digester, which in turn uses

When running Vindico as an Ant task,  it starts running and then says
that it cannot find the LogFactoryImpl class.

I have traced this down to the getClassLoader() function in LogFactory,
which returns the Thread.getContextClassLoader() if there is one.

The problem that I have is the LogFactoryImpl class is in the same class
loader as LogFactory, so I am suggesting a change to LogFactory, such
that the default class loader is used.  Patch is below.  Are there other
problems that this does not address?

Any questions, comments, suggestions?

If not, I will commit this.


Index: src/java/org/apache/commons/logging/
RCS file:
retrieving revision 1.6
diff -u -r1.6
--- src/java/org/apache/commons/logging/ 15 Mar 2002
22:57:36 -0000      1.6
+++ src/java/org/apache/commons/logging/ 22 Apr 2002
16:48:12 -0000
@@ -347,7 +347,7 @@

         // Fourth, try the fallback implementation class
         if (factory == null) {
-            factory = newFactory(FACTORY_DEFAULT, classLoader);
+            factory = newFactory(FACTORY_DEFAULT,

         if( props!=null ) {

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message