aspose file tools*
The moose likes Beginning Java and the fly likes Invalid class loader hierarchy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Invalid class loader hierarchy" Watch "Invalid class loader hierarchy" New topic
Author

Invalid class loader hierarchy

miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
i'm trying to run a test from command line; when run from eclipse all goes fine, but from command line (swingui) i get this annoying error msg:
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.))

if a delete that jar from classpath, then msg error saying it is missing...

else, if i use junit.textui.TestRunner, i get this error msg:
There was 1 error:
1) testCria(persistencia.TestePersistenciaUtente)java.lang.NoClassDefFoundError: javax/tra
nsaction/Synchronization
at net.sf.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:31

i googled for:
javax/transaction/Synchronization

but this interface is... empty!
can anybody help me please?

TiA


java amateur
Dale Seng
Ranch Hand

Joined: Mar 22, 2004
Posts: 275
The best thing to do is to wipe-out your classpath variable. This means you need to start your command line with any things you need. But that should be easy because it's all in your .classpath file for your eclipse project. Just open it up with a text editor. What I'd to is type in the command in a text file with the classpath, you know, -classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.

That way you only get what your project specifically needs.

--Dale--
 
 
subject: Invalid class loader hierarchy