Hello all,
I am trying to test some methods that retrieve objects from a database through hibernate. Unfortunately the test method throes a hibernate exception which I don't understand. The exception is as follows:
Code:
Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed
Do you know how can I solve this problem? Below I have some informationThe directory structure of my project is the following:
Code:
/src
/conf
/java
/essex.cc403.registry
EventRegistry.java
/test
/essex.cc403.registry
EventRegistry.java
/build
/web
/WEB-INF
/classes
hibernate.properties
log4j.properties
/essex.cc403.registry
EventRegistry.class
The classpath:
Code:
build/web/WEB-INF/classes/
build/test
hibernate libraries
The ant target that test the source:
Code:
<target name="run-test" depends="build,build-test">
<java fork="true" classname="junit.swingui.TestRunner" classpathref="project.classpath"/>
</target>
Hibernate version: 2.1.8
Name and version of the database you are using:hsqldb-1.7.3.3
Full stack trace of any exception that occurs:Code:
Caused by: org.apache.commons.logging.LogConfigurationException: 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. (Caused by 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.) (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. (Caused by 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.))