Trying to use hibernate-tools.jar to run this ant task linking against Hibernate4:
Code:
<target name="hibernate-codegen">
<hibernatetool destdir="src">
<configuration configurationfile="hibernate_config/hibernate-ant-remote.cfg.xml">
<fileset dir="hibernate_config/hbm">
<include name="**/*.hbm.xml"/>
</fileset>
</configuration>
<hbm2java jdk5="true" ejb3="true"/>
</hibernatetool>
</target>
Works fine when linking against Hibernate3.6, but Hibernate4 gets pretty far along but then...
Code:
INFO: HHH00220:Reading mappings from file: C:\dev\as2\hibernate_config\hbm\Title.hbm.xml
Aug 24, 2011 6:00:59 PM org.hibernate.internal.CoreMessageLogger_$logger readingMappingsFromFile
INFO: HHH00220:Reading mappings from file: C:\dev\as2\hibernate_config\hbm\TitleLicense.hbm.xml
Aug 24, 2011 6:01:00 PM org.hibernate.tool.Version <clinit>
INFO: Hibernate Tools 3.4.0.CR1
C:\dev\as2\adapt_server\ant\build.xml:84: java.lang.NoClassDefFoundError: org/hibernate/util/StringHelper
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
...
Looks like StringHelper was removed from hibernate4. Any suggestions which combination of jars I should use to start my migration to hibernate4 for this ant task?
These are the jars I link against:
commons-logging-1.1.1.jar
dom4j-1.6.1.jar
freemarker.jar
hibernate-tools.jar
hibernate-validator-3.0.0.jar
slf4j-api-1.6.1.jar
slf4j-simple-1.6.1.jar
hibernate-core-4.0.0.CR1.jar
hibernate-jpa-2.0-api-1.0.0.Final.jar
hibernate-commons-annotations-3.2.0.Final.jar
jboss-logging-3.0.0.Beta5.jar
jta-1.1.jar
Thanks.