I have only this jars now in my classpath:
$ ls -l lib
total 1824
-rw-r--r-- 1 john john 38015 May 25 01:03 commons-logging-1.0.4.jar
-rw-r--r-- 1 john john 137589 Aug 2 11:04 hibernate-tools.jar
-rw-r--r-- 1 john john 1674454 May 25 01:00 hibernate3.jar
But I get this error:
$ ant -v
Apache Ant version 1.6.2 compiled on August 26 2004
Buildfile: build.xml
Detected Java version: 1.4 in: /usr/lib/j2se1.4-sun/jre
Detected OS: Linux
parsing buildfile /home/john/workspace/htest/build.xml with URI = file:///home/john/workspace/htest/build.xml
Project base dir set to: /home/john/workspace/htest
Build sequence for target `gen-classes' is [gen-classes]
Complete build sequence is [gen-classes, ]
gen-classes:
[hibernatetool] Executing Hibernate Tool with a Standard Configuration
[hibernatetool] 1. task: hbm2java (Generates a set of .java files)
BUILD FAILED
java.lang.ExceptionInInitializerError
at org.apache.tools.ant.Project.executeTarget(Unknown Source)
at org.apache.tools.ant.Project.executeTargets(Unknown Source)
at org.apache.tools.ant.Main.runBuild(Unknown Source)
at org.apache.tools.ant.Main.startAnt(Unknown Source)
at org.apache.tools.ant.launch.Launcher.run(Unknown Source)
at org.apache.tools.ant.launch.Launcher.main(Unknown Source)
Caused by: java.lang.ExceptionInInitializerError
at org.hibernate.tool.ant.Hbm2JavaGeneratorTask.createExporter(Hbm2JavaGeneratorTask.java:44)
at org.hibernate.tool.ant.GeneratorTask.execute(GeneratorTask.java:32)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:115)
at org.apache.tools.ant.UnknownElement.execute(Unknown Source)
at org.apache.tools.ant.Task.perform(Unknown Source)
at org.apache.tools.ant.Target.execute(Unknown Source)
at org.apache.tools.ant.Target.performTasks(Unknown Source)
... 6 more
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.))
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.hibernate.tool.hbm2x.POJOExporter.<clinit>(POJOExporter.java:26)
... 13 more
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.)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
... 17 more
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.
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385)
... 18 more
--- Nested Exception ---
java.lang.ExceptionInInitializerError
at org.hibernate.tool.ant.Hbm2JavaGeneratorTask.createExporter(Hbm2JavaGeneratorTask.java:44)
at org.hibernate.tool.ant.GeneratorTask.execute(GeneratorTask.java:32)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:115)
at org.apache.tools.ant.UnknownElement.execute(Unknown Source)
at org.apache.tools.ant.Task.perform(Unknown Source)
at org.apache.tools.ant.Target.execute(Unknown Source)
at org.apache.tools.ant.Target.performTasks(Unknown Source)
at org.apache.tools.ant.Project.executeTarget(Unknown Source)
at org.apache.tools.ant.Project.executeTargets(Unknown Source)
at org.apache.tools.ant.Main.runBuild(Unknown Source)
at org.apache.tools.ant.Main.startAnt(Unknown Source)
at org.apache.tools.ant.launch.Launcher.run(Unknown Source)
at org.apache.tools.ant.launch.Launcher.main(Unknown Source)
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.))
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.hibernate.tool.hbm2x.POJOExporter.<clinit>(POJOExporter.java:26)
... 13 more
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.)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
... 17 more
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.
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385)
... 18 more
Total time: 1 second
|