• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Invalid class loader hierarchy

 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Dale Seng
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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--
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic