-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Principal keys with Dates
PostPosted: Tue Oct 21, 2003 3:48 pm 
Newbie

Joined: Mon Oct 20, 2003 12:18 pm
Posts: 12
Location: Mexico
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 21, 2003 3:50 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
This is a known bug in the XDoclet module, I believe.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.