When I run hbm2java or hbmtemplate in ant, I get an error saying
[hibernatetool] freemarker.core.InvalidReferenceException: Expression c2h.isOneToOne is undefined on line 10, column 6 in pojo/Ejb3PropertyGetAnnotation.ftl.
As far as I can find, this problem was addressed exactly once before, here
http://community.jboss.org/message/326201#326201The original poster claims that fixing the dependency did it, but I am absolutely sure that is not the cause of the problem for me.
Code:
<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib" />
<hibernatetool
destdir="src/main/java/" >
<jdbcconfiguration
configurationfile="src/main/resources/hibernate.cfg.xml"
revengfile="generate/reveng.xml"
packagename="com.yoshi.persistence.dao" />
<hbm2java
templatepath="generate/hibernate-tools-flt"
jdk5="true"
ejb3="true" />
<hbmtemplate
exporterclass="org.hibernate.tool.hbm2x.POJOExporter"
templatepath="generate/hibernate-tools-flt/pojo"
template="Pojo.ftl"
filepattern="{package-name}/{class-name}.java">
<property key="jdk5" value="true"/>
<property key="ejb3" value="true"/>
</hbmtemplate>