i copy all vm file from hibernate-tools.jar to src/
and set the ant build.xml:
Code:
<hibernatetool destdir="src">
<configuration >
<fileset dir="src" id="id">
<include name="**/*.hbm.xml"/>
</fileset>
</configuration>
<hbmtemplate template="src/Pojo.vm" filepattern="{package-name}/{class-name}.java"/>
</hibernatetool>
show the error:
Code:
build.xml:68: org.hibernate.tool.hbm2x.ExporterException: MethodInvocationException while processing template src/Pojo.vm. Invocation of method 'get' in class org.hibernate.tool.hbm2x.TemplateHelper$Templates threw exception class org.hibernate.tool.hbm2x.ExporterException : MethodInvocationException while processing template PojoFields.vm. Invocation of method 'importType' in class org.hibernate.tool.hbm2x.pojo.EntityPOJOClass threw exception class java.lang.NullPointerException : null
but i replace the <hbmtemplate.. with <hbm2java/> , the code generated.
what's the problem? thx