Joined: Wed May 31, 2006 6:40 am Posts: 19
|
Hibernate version:
3.2.0 cr2 ejb3 shipped with jboss 4.0.4 ga
Full stack trace of any exception that occurs:
[hibernatetool] freemarker.template.TemplateModelException: Method public java.lang.String org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.getJavaTypeName(org.hibernate.mapping.Property,boolean) threw an exception when invoked on org.hibernate.tool.hbm2x.pojo.ComponentPOJOClass(com.kirio.S3.ejb3.bean.LinguaId)
[hibernatetool] java.lang.NullPointerException
Ant task:
<!--
==========================================================================================
GENERATE DAO INTERFACE
==========================================================================================
-->
<target name="generateHibernateDaoInterfaceClasses">
<hibernatetool destdir="${generated.file.dir}/generated">
<jdbcconfiguration preferbasiccompositeids="true" configurationfile="${hibernateRootDir}/hibernate.cfg.xml" revengfile="${hibernateRootDir}/hibernate.reveng.xml" packagename="com.kirio.S3.ejb3.interfaces" />
<hbmtemplate filepattern="{package-name}/I{class-name}Home.java" templatepath="${hibernateRootDir}/template/dao" template="daointerfacehome.ftl">
<property key="jdk5" value="true" />
<property key="ejb3" value="true" />
</hbmtemplate>
</hibernatetool>
</target>
<!--
==========================================================================================
GENERATE DAO IMPLEMENTATION
==========================================================================================
-->
<target name="generateHibernateDaoImplClasses">
<hibernatetool destdir="${generated.file.dir}/generated">
<jdbcconfiguration packagename="com.kirio.S3.ejb3.bean" configurationfile="${hibernateRootDir}/hibernate.cfg.xml" revengfile="${hibernateRootDir}/hibernate.reveng.xml" />
<hbmtemplate filepattern="{package-name}/{class-name}Home.java" templatepath="${hibernateRootDir}/template/dao" template="daohome.ftl" >
<property key="jdk5" value="true" />
<property key="ejb3" value="true" />
</hbmtemplate>
</hibernatetool>
</target>
i try to generate custom dao & dao interface... but i have a table named Lingua with "complex" pk and so it generate pojo LinguaId.. but as u can see this break mi dao & dao interface... luckly seems that corresponding dao LinguaHome and dao interface ILinguaHome are generated correctly... how can i exclude LinguaId and other id files from my template generation???
thanks to all!!!
|
|