Hibernate version:
3.1.0 Beta 4
Name and version of the database you are using:
Oracle XE 10.2.0.1.0
Debug level Hibernate log excerpt:
Code:
[hibernatetool] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
[hibernatetool] 1. task: hbm2hbmxml (Generates a set of hbm.xml files)
BUILD FAILED
F:\Programming\Java\workspace\DelegateItProject\hibernateReverseEngeneering\build.xml:38: org.hibernate.tool.hbm2x.ExporterException: Exception when instantiating tool hibernatetool.hbm2x.stringUtils.toolclass with org.hibernate.tool.hbm2x.StringUtils
What I am trying to do is add the StringUtils class to the Velocity templates.
I read this Issue:
http://opensource2.atlassian.com/projects/hibernate/browse/HBX-171Here Max says to set a property with the given utility class.
Like...
hibernatetool.hbm2x.myTool.toolclass = mypackage.MyTool
In the Hibernate Docs I found a diferent sintax...
<property key="sometool.toolclass" value="x.y.z.NameOfToolClass"/>
Neither of them work.
The later gives no error but does nothing. The first gives the upper error.
Here's my ANT script snippet...
Code:
<hibernatetool destdir="${build.classes.dir}"
templatepath="${template.dir}">
<jdbcconfiguration configurationfile="hibernate.cfg.xml"
revengfile="hibernate.reveng.xml"
packagename="com.teamware.delegateit.model"/>
<property key="jdk5" value="true"/>
<property key="ejb3" value="false"/>
<property key="hibernatetool.hbm2x.stringUtils.toolclass"
value="org.hibernate.tool.hbm2x.StringUtils"/>
<hbm2hbmxml destdir="${build.classes.dir}"/>
<hbmtemplate destdir="${build.classes.dir}" templateprefix="pojo/"
template="templates/pojo/Pojo.vm"
filepattern="{package-name}/{class-name}.java"/>
</hibernatetool>
And in my template I try to use:
$stringUtils.upperCase("sometext")
The class I'm trying to add to the template is inside the HibernateTools.jar, so why can't it find it?
Wrong sintax?
Didn't I get the instructions right?
Thanks in advance,[/code]