These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Junit and Hibernate Problem
PostPosted: Tue Mar 15, 2005 1:31 pm 
Newbie

Joined: Thu Jun 17, 2004 4:16 pm
Posts: 18
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 information
The 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.))


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.