Hibernate version: 3.0.2
Mapping documents:3.0
Full stack trace of any exception that occurs:
I have upgraded from hibernate-2.1 to hibernate-3.0.2
now I'm trying to upgrade to new hibernate tools
here is my new build.xml:
Code:
<target name="hbm2java">
<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="project.class.path"/>
<hibernatetool destdir="${gen-src}" >
<configuration propertyfile="${etc}/hibernate.properties">
<fileset dir="${src}">
<include name="**/*.hbm.xml" />
</fileset>
</configuration>
<hbm2java/>
</hibernatetool>
</target>
I have tried to use "HibernateTools-3.1.0.beta2" and got following exception:
[hibernatetool] (hbm2x.template 94 ) Method getJavaTypeNam
e threw exception for reference $pojo in template pojo/PojoFields.vm at [10,37]
[hibernatetool] (hbm2x.template 94 ) Method get threw exce
ption for reference $templates in template pojo/Pojo.vm at [10,1]
BUILD FAILED
C:\development\eclipse\workspace\nms\nmss\build.xml:431: org.hibernate.tool.hbm2
x.ExporterException: MethodInvocationException while processing template Pojo. I
nvocation of method 'get' in class org.hibernate.tool.hbm2x.TemplateHelper$Temp
lates threw exception class org.hibernate.tool.hbm2x.ExporterException : MethodI
nvocationException while processing template pojo/PojoFields.vm. Invocation of m
ethod 'getJavaTypeName' in class org.hibernate.tool.hbm2x.pojo.EntityPOJOClass
threw exception class org.hibernate.tool.hbm2x.ExporterException : Could not res
olve type without exception for org.hibernate.mapping.Property(parameters) Value
: org.hibernate.mapping.Array(com.crossbeamsys.nms.task.TaskDO.parameters)
now when I try to use "hibernate-tools-3.1.0.alpha5" it works, but
for my id define as:
Code:
<id name="id" type="long" column="deviceid" unsaved-value="-1">
I get generated "Long" instead of "long",
1. why is that?
2. also, in hibernate-tools 2 I could define the following
Code:
hbm2java config="${build-src}/codegen.cfg.xml" output="${gen-src}"
which allowed me to use codegen.cfg.xml and define meta tags, now I don't see anywhere in the doc on how to do that.
3. Also tried "hibernate-tools-3.0.0.alpha4a", but here I'm getting
java.lang.ExceptionInInitializerError
PLEASE HELP!!!