commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Antonio Pérez Testa <>
Subject Re: [logging] Invalid class loader hierarchy w/Ant+Hibernate+Logging (or the case of the unseen Log spectre)
Date Tue, 24 Aug 2004 06:20:58 GMT
IMO the problem is still there because of some other jar in the classpath.
ant-commons-logging.jar only contains a class wrapper to commons-logging 
The actual implementation must be in a jar named commons-logging.jar 
somewhere in the classpath.


Brian Lee Yung Rowe wrote:

>I'm using commons logging with Ant and Hibernate and am getting a class loader 
>error which has me scratching my head. I'm sending to this list as I believe 
>it to be a configuration issue with Logging as opposed to Hibernate. Evidence 
>otherwise is certainly welcome.
>First some background: I'm trying to run Hibernate's schema export taskdef via 
>Ant. The versions of salient libraries are below:
>Ant 1.6.1
>Commons-Logging 1.0.4
>Log4J 1.2.8
>Hibernate 2.1
>This is the error I'm getting:
>--- Nested Exception ---
>        at 
>        at 
>Caused by: org.apache.commons.logging.LogConfigurationException: 
>org.apache.commons.logging.LogConfigurationException: Invalid class loader 
>hierarchy.  You have more than one version of 
>'org.apache.commons.logging.Log' visible, which is not allowed.
>        at 
>I checked my classpath (with a home-grown utility) to verify that there is 
>only one org.apache.commons.logging.Log class within all of the jars in the 
>Running ant -diagnostic shows the ant-commons-logging.jar loaded via Ant. I 
>removed this jar and got the same error.
>Now the interesting part. I removed the commons-logging.jar from my classpath 
>and now I get a 
>java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
>        at
>        at
>which I take to mean that I truly have only one copy of the commons-logging 
>package in my classpath. 
>So why does logging think there's an additional version of Log visible?
>Any ideas are greatly appreciated.
Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene información
de carácter confidencial exclusivamente dirigida a su destinatario o destinatarios. Queda
prohibida su divulgación, copia o distribución a terceros sin la previa autorización escrita
de Indra. En el caso de haber recibido este correo electrónico por error, se ruega notificar
inmediatamente esta circunstancia mediante reenvío a la dirección electrónica del remitente.

The information in this e-mail and in any attachments is confidential and solely for the attention
and use of the named addressee(s). You are hereby notified that any dissemination, distribution
or copy of this communication is prohibited without the prior written consent of Indra. If
you have received this communication in error, please, notify the sender by reply e-mail

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

View raw message