Hibernate: 3.3.1
Hibernate tools: 3.2.4
Eclipse : 3.4
ANT : 1.7
Hi all,
I have a similar problem like that already discussed here
http://forum.hibernate.org/viewtopic.ph ... highlight=
The main difference is that I'm running
hbm2ddl from ANT.
Code:
<target name="hbm2ddl" >
<hibernatetool destdir="${basedir}/generated">
<classpath>
<path location="${classes.dir}"/>
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</classpath>
<configuration configurationfile="${classes.dir}/hibernate.cfg.xml">
</configuration>
<hbm2ddl export="false" outputfilename="sql.ddl"/>
</hibernatetool>
</target>
When I run that code the console outputs this:
hbm2ddl:
[echo] hbm to ddl starting...
[hibernatetool] Executing Hibernate Tool with a Standard Configuration
[hibernatetool] 1. task: hbm2ddl (Generates database schema)
BUILD FAILED
/home/rgambelli/workspace_3_4/StrutsHib/build/build.xml:31: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
Total time: 4 seconds
Inside the classpath element inside hibernatetool task, the variable lib.dir points out to many jars one of which is obviously
commons-logging-1.0.4.jar
What could I try?
Thanks and best regards
Gamby