Hibernate version:3.0.5 (from CVS)
I'm using H3 and hibernate tools from CVS. When running the hbm2java ant task, I get the following error and warnings:
Quote:
[hibernatetool] ERRORlogVelocityMessage, ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader.
[hibernatetool] WARN logVelocityMessage, org.apache.velocity.runtime.exception.ReferenceException: reference : template = pojo/javaclass.vm [line 10,column 1] : $secondpassclassimports is not a valid reference.
[hibernatetool] WARN logVelocityMessage, org.apache.velocity.runtime.exception.ReferenceException: reference : template = pojo/javaclass.vm [line 13,column 1] : $c2j.getJavaDoc($clazz, $render.eval($ctx, "$c2j.getDeclarationName($clazz) generated by hbm2java"),0) is not a valid reference.
[hibernatetool] WARN logVelocityMessage, Warning! The iterative is an Iterator in the #foreach() loop at [0,0] in template pojo/javaclass.vm. Because it's not resetable, if used in more than once, this may lead to unexpected results.
... (lots more warnings)
It's generating java classes, although there is still some velocity-looking stuff in the class javadoc comments (I don't know much about velocity).
I don't see VM_global_library.vm anywhere in the hibernate tools CVS files, and I'm not sure how to get rid of this error. I believe I have all the right jars, etc. in place. I've been following the instructions on building the tools from:
http://www.hibernate.org/268.html
and the instructions on using the ant tasks from:
http://cvs.sourceforge.net/viewcvs.py/*checkout*/hibernate/HibernateExt/tools/doc/index.html
Thanks in advance for any help with this.
Here is my ant task:
Code:
<target name="runhibernatetools">
<hibernatetool destdir="generated">
<classpath>
<path location="${resources.dir}/hibernate" />
</classpath>
<configuration configurationfile="${resources.dir}/hibernate/product.cfg.xml">
</configuration>
<hbm2java />
<!-- generate default .java files -->
<hbm2ddl export="false" outputfilename="product-schema.ddl" />
<!-- export schema to database. If outputfilename is provided a text file is generated instead. -->
</hibernatetool>
</target>