Its possible create principal keys like dates. I have the next code:
Code:
/**
* @hibernate.id
* generator-class="assigned"
* column="initialDate"
* type="date"
*
* @return String
*/
public Date getId() {
return id;
}
public void setId(Date id) {
this.id = id;
}
but when I try to generate with ANT send me the next messagge
Code:
[hibernatedoclet] Generating mapping file for com.ixe.ods.seguridad.model.SeguFechasInhabiles.
[hibernatedoclet] com.ixe.ods.seguridad.model.SeguFechasInhabiles
[hibernatedoclet] (TemplateEngine.invokeMethod 541 ) Invoking method failed: xdoclet.modules.hibernate.HibernateTagsHandle
r.ifHasCompositeId, line=95 of template file: jar:file:C:\Developer\security\lib\xdoclet\xdoclet-hibernate-module-1.2b3-dev.jar!/x
doclet/modules/hibernate/resources/hibernate.xdt
[hibernatedoclet] java.lang.reflect.InvocationTargetException
[hibernatedoclet] at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
[hibernatedoclet] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[hibernatedoclet] at java.lang.reflect.Method.invoke(Method.java:324)
[hibernatedoclet] at xdoclet.template.TemplateEngine.invoke(TemplateEngine.java:603)
[hibernatedoclet] at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.java:529)
[hibernatedoclet] at xdoclet.template.TemplateEngine.invokeBlockMethod(TemplateEngine.java:927)
[hibernatedoclet] at xdoclet.template.TemplateEngine.handleBlockTag(TemplateEngine.java:894)
[hibernatedoclet] at xdoclet.template.TemplateEngine.handleTag(TemplateEngine.java:434)
[hibernatedoclet] at xdoclet.template.TemplateEngine.generate(TemplateEngine.java:333)
[hibernatedoclet] at xdoclet.template.TemplateEngine.start(TemplateEngine.java:382)
[hibernatedoclet] at xdoclet.TemplateSubTask.startEngine(TemplateSubTask.java:559)
[hibernatedoclet] at xdoclet.TemplateSubTask.generateForClass(TemplateSubTask.java:765)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcessPerClass(TemplateSubTask.java:665)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:592)
[hibernatedoclet] at xdoclet.XmlSubTask.startProcess(XmlSubTask.java:196)
[hibernatedoclet] at xdoclet.modules.hibernate.HibernateSubTask.execute(HibernateSubTask.java:125)
[hibernatedoclet] at xdoclet.XDocletMain.start(XDocletMain.java:48)
[hibernatedoclet] at xdoclet.DocletTask.start(DocletTask.java:458)
[hibernatedoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:95)
[hibernatedoclet] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166)
[hibernatedoclet] at org.apache.tools.ant.Task.perform(Task.java:317)
[hibernatedoclet] at org.apache.tools.ant.Target.execute(Target.java:309)
[hibernatedoclet] at org.apache.tools.ant.Target.performTasks(Target.java:334)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[hibernatedoclet] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
[hibernatedoclet] at org.apache.tools.ant.Task.perform(Task.java:317)
[hibernatedoclet] at org.apache.tools.ant.Target.execute(Target.java:309)
[hibernatedoclet] at org.apache.tools.ant.Target.performTasks(Target.java:334)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
[hibernatedoclet] at org.apache.tools.ant.Main.runBuild(Main.java:610)
[hibernatedoclet] at org.apache.tools.ant.Main.start(Main.java:196)
[hibernatedoclet] at org.apache.tools.ant.Main.main(Main.java:235)
[hibernatedoclet] Caused by: java.lang.NullPointerException
[hibernatedoclet] at xdoclet.modules.hibernate.HibernateTagsHandler.hasCompositeId_Impl(HibernateTagsHandler.java:366)
[hibernatedoclet] at xdoclet.modules.hibernate.HibernateTagsHandler.ifHasCompositeId(HibernateTagsHandler.java:143)
[hibernatedoclet] ... 33 more
[hibernatedoclet] xdoclet.template.TemplateException: Invoking method in class xdoclet.modules.hibernate.HibernateTagsHandler fail
ed: ifHasCompositeId, line=95 of template file: jar:file:C:\Developer\security\lib\xdoclet\xdoclet-hibernate-module-1.2b3-dev.jar!
/xdoclet/modules/hibernate/resources/hibernate.xdt, exception: null
[hibernatedoclet] at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.java:542)
[hibernatedoclet] at xdoclet.template.TemplateEngine.invokeBlockMethod(TemplateEngine.java:927)
[hibernatedoclet] at xdoclet.template.TemplateEngine.handleBlockTag(TemplateEngine.java:894)
[hibernatedoclet] at xdoclet.template.TemplateEngine.handleTag(TemplateEngine.java:434)
[hibernatedoclet] at xdoclet.template.TemplateEngine.generate(TemplateEngine.java:333)
[hibernatedoclet] at xdoclet.template.TemplateEngine.start(TemplateEngine.java:382)
[hibernatedoclet] at xdoclet.TemplateSubTask.startEngine(TemplateSubTask.java:559)
[hibernatedoclet] at xdoclet.TemplateSubTask.generateForClass(TemplateSubTask.java:765)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcessPerClass(TemplateSubTask.java:665)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:592)
[hibernatedoclet] at xdoclet.XmlSubTask.startProcess(XmlSubTask.java:196)
[hibernatedoclet] at xdoclet.modules.hibernate.HibernateSubTask.execute(HibernateSubTask.java:125)
[hibernatedoclet] at xdoclet.XDocletMain.start(XDocletMain.java:48)
[hibernatedoclet] at xdoclet.DocletTask.start(DocletTask.java:458)
[hibernatedoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:95)
[hibernatedoclet] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166)
[hibernatedoclet] at org.apache.tools.ant.Task.perform(Task.java:317)
[hibernatedoclet] at org.apache.tools.ant.Target.execute(Target.java:309)
[hibernatedoclet] at org.apache.tools.ant.Target.performTasks(Target.java:334)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[hibernatedoclet] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
[hibernatedoclet] at org.apache.tools.ant.Task.perform(Task.java:317)
[hibernatedoclet] at org.apache.tools.ant.Target.execute(Target.java:309)
[hibernatedoclet] at org.apache.tools.ant.Target.performTasks(Target.java:334)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
[hibernatedoclet] at org.apache.tools.ant.Main.runBuild(Main.java:610)
[hibernatedoclet] at org.apache.tools.ant.Main.start(Main.java:196)
[hibernatedoclet] at org.apache.tools.ant.Main.main(Main.java:235)
[hibernatedoclet] (XDocletMain.start 53 ) Running XDoclet failed.
[hibernatedoclet] (XDocletMain.start 54 ) <<Running XDoclet failed.>>
[hibernatedoclet] xdoclet.template.TemplateException: Invoking method in class xdoclet.modules.hibernate.HibernateTagsHandler fail
ed: ifHasCompositeId, line=95 of template file: jar:file:C:\Developer\security\lib\xdoclet\xdoclet-hibernate-module-1.2b3-dev.jar!
/xdoclet/modules/hibernate/resources/hibernate.xdt, exception: null
[hibernatedoclet] at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.java:542)
[hibernatedoclet] at xdoclet.template.TemplateEngine.invokeBlockMethod(TemplateEngine.java:927)
[hibernatedoclet] at xdoclet.template.TemplateEngine.handleBlockTag(TemplateEngine.java:894)
[hibernatedoclet] at xdoclet.template.TemplateEngine.handleTag(TemplateEngine.java:434)
[hibernatedoclet] at xdoclet.template.TemplateEngine.generate(TemplateEngine.java:333)
[hibernatedoclet] at xdoclet.template.TemplateEngine.start(TemplateEngine.java:382)
[hibernatedoclet] at xdoclet.TemplateSubTask.startEngine(TemplateSubTask.java:559)
[hibernatedoclet] at xdoclet.TemplateSubTask.generateForClass(TemplateSubTask.java:765)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcessPerClass(TemplateSubTask.java:665)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:592)
[hibernatedoclet] at xdoclet.XmlSubTask.startProcess(XmlSubTask.java:196)
[hibernatedoclet] at xdoclet.modules.hibernate.HibernateSubTask.execute(HibernateSubTask.java:125)
[hibernatedoclet] at xdoclet.XDocletMain.start(XDocletMain.java:48)
[hibernatedoclet] at xdoclet.DocletTask.start(DocletTask.java:458)
[hibernatedoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:95)
[hibernatedoclet] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166)
[hibernatedoclet] at org.apache.tools.ant.Task.perform(Task.java:317)
[hibernatedoclet] at org.apache.tools.ant.Target.execute(Target.java:309)
[hibernatedoclet] at org.apache.tools.ant.Target.performTasks(Target.java:334)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[hibernatedoclet] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
[hibernatedoclet] at org.apache.tools.ant.Task.perform(Task.java:317)
[hibernatedoclet] at org.apache.tools.ant.Target.execute(Target.java:309)
[hibernatedoclet] at org.apache.tools.ant.Target.performTasks(Target.java:334)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
[hibernatedoclet] at org.apache.tools.ant.Main.runBuild(Main.java:610)
[hibernatedoclet] at org.apache.tools.ant.Main.start(Main.java:196)
[hibernatedoclet] at org.apache.tools.ant.Main.main(Main.java:235)
[hibernatedoclet] file:C:/Developer/security/common.xml:67: XDoclet failed.
[hibernatedoclet] at xdoclet.DocletTask.start(DocletTask.java:461)
[hibernatedoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:95)
[hibernatedoclet] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166)
[hibernatedoclet] at org.apache.tools.ant.Task.perform(Task.java:317)
[hibernatedoclet] at org.apache.tools.ant.Target.execute(Target.java:309)
[hibernatedoclet] at org.apache.tools.ant.Target.performTasks(Target.java:334)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[hibernatedoclet] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
[hibernatedoclet] at org.apache.tools.ant.Task.perform(Task.java:317)
[hibernatedoclet] at org.apache.tools.ant.Target.execute(Target.java:309)
[hibernatedoclet] at org.apache.tools.ant.Target.performTasks(Target.java:334)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
[hibernatedoclet] at org.apache.tools.ant.Main.runBuild(Main.java:610)
[hibernatedoclet] at org.apache.tools.ant.Main.start(Main.java:196)
[hibernatedoclet] at org.apache.tools.ant.Main.main(Main.java:235)
[hibernatedoclet] --- Nested Exception ---
[hibernatedoclet] xdoclet.XDocletException: Running XDoclet failed.
[hibernatedoclet] at xdoclet.TemplateSubTask.generateForClass(TemplateSubTask.java:774)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcessPerClass(TemplateSubTask.java:665)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:592)
[hibernatedoclet] at xdoclet.XmlSubTask.startProcess(XmlSubTask.java:196)
[hibernatedoclet] at xdoclet.modules.hibernate.HibernateSubTask.execute(HibernateSubTask.java:125)
[hibernatedoclet] at xdoclet.XDocletMain.start(XDocletMain.java:48)
[hibernatedoclet] at xdoclet.DocletTask.start(DocletTask.java:458)
[hibernatedoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:95)
[hibernatedoclet] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166)
[hibernatedoclet] at org.apache.tools.ant.Task.perform(Task.java:317)
[hibernatedoclet] at org.apache.tools.ant.Target.execute(Target.java:309)
[hibernatedoclet] at org.apache.tools.ant.Target.performTasks(Target.java:334)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[hibernatedoclet] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
[hibernatedoclet] at org.apache.tools.ant.Task.perform(Task.java:317)
[hibernatedoclet] at org.apache.tools.ant.Target.execute(Target.java:309)
[hibernatedoclet] at org.apache.tools.ant.Target.performTasks(Target.java:334)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
[hibernatedoclet] at org.apache.tools.ant.Main.runBuild(Main.java:610)
[hibernatedoclet] at org.apache.tools.ant.Main.start(Main.java:196)
[hibernatedoclet] at org.apache.tools.ant.Main.main(Main.java:235)
BUILD FAILED
Thanks in advance