Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:3.0
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
[hibernatedoclet] C:\Projetos\framework-ANP\HibernateLocal.xml:58: XDoclet failed.
[hibernatedoclet] at xdoclet.DocletTask.start(DocletTask.java:471)
[hibernatedoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:105)
[hibernatedoclet] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[hibernatedoclet] at org.apache.tools.ant.Task.perform(Task.java:364)
[hibernatedoclet] at org.apache.tools.ant.Target.execute(Target.java:341)
[hibernatedoclet] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
[hibernatedoclet] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:385)
[hibernatedoclet] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:136)
[hibernatedoclet] Caused by: xdoclet.XDocletException: Class br.muralha.MenuPai misses ID property
[hibernatedoclet] at xdoclet.modules.hibernate.HibernateTagsHandler.hasCompositeId_Impl(HibernateTagsHandler.java:668)
[hibernatedoclet] at xdoclet.modules.hibernate.HibernateTagsHandler.ifHasPrimitiveId(HibernateTagsHandler.java:211)
[hibernatedoclet] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[hibernatedoclet] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[hibernatedoclet] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[hibernatedoclet] at java.lang.reflect.Method.invoke(Unknown Source)
[hibernatedoclet] at xdoclet.template.TemplateEngine.invoke(TemplateEngine.java:641)
[hibernatedoclet] at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.java:567)
[hibernatedoclet] at xdoclet.template.TemplateEngine.invokeBlockMethod(TemplateEngine.java:965)
[hibernatedoclet] at xdoclet.template.TemplateEngine.handleBlockTag(TemplateEngine.java:932)
[hibernatedoclet] at xdoclet.template.TemplateEngine.handleTag(TemplateEngine.java:472)
[hibernatedoclet] at xdoclet.template.TemplateEngine.generate(TemplateEngine.java:348)
[hibernatedoclet] at xdoclet.template.TemplateEngine.start(TemplateEngine.java:415)
[hibernatedoclet] at xdoclet.TemplateSubTask.startEngine(TemplateSubTask.java:562)
[hibernatedoclet] at xdoclet.TemplateSubTask.generateForClass(TemplateSubTask.java:779)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcessPerClass(TemplateSubTask.java:679)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:596)
[hibernatedoclet] at xdoclet.XmlSubTask.startProcess(XmlSubTask.java:227)
[hibernatedoclet] at xdoclet.modules.hibernate.HibernateSubTask.execute(HibernateSubTask.java:123)
[hibernatedoclet] at xdoclet.XDocletMain.start(XDocletMain.java:48)
[hibernatedoclet] at xdoclet.DocletTask.start(DocletTask.java:468)
[hibernatedoclet] ... 8 more
[hibernatedoclet] --- Nested Exception ---
[hibernatedoclet] xdoclet.XDocletException: Class br.muralha.MenuPai misses ID property
[hibernatedoclet] at xdoclet.modules.hibernate.HibernateTagsHandler.hasCompositeId_Impl(HibernateTagsHandler.java:668)
[hibernatedoclet] at xdoclet.modules.hibernate.HibernateTagsHandler.ifHasPrimitiveId(HibernateTagsHandler.java:211)
[hibernatedoclet] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[hibernatedoclet] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[hibernatedoclet] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[hibernatedoclet] at java.lang.reflect.Method.invoke(Unknown Source)
[hibernatedoclet] at xdoclet.template.TemplateEngine.invoke(TemplateEngine.java:641)
[hibernatedoclet] at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.java:567)
[hibernatedoclet] at xdoclet.template.TemplateEngine.invokeBlockMethod(TemplateEngine.java:965)
[hibernatedoclet] at xdoclet.template.TemplateEngine.handleBlockTag(TemplateEngine.java:932)
[hibernatedoclet] at xdoclet.template.TemplateEngine.handleTag(TemplateEngine.java:472)
[hibernatedoclet] at xdoclet.template.TemplateEngine.generate(TemplateEngine.java:348)
[hibernatedoclet] at xdoclet.template.TemplateEngine.start(TemplateEngine.java:415)
[hibernatedoclet] at xdoclet.TemplateSubTask.startEngine(TemplateSubTask.java:562)
[hibernatedoclet] at xdoclet.TemplateSubTask.generateForClass(TemplateSubTask.java:779)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcessPerClass(TemplateSubTask.java:679)
[hibernatedoclet] at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:596)
[hibernatedoclet] at xdoclet.XmlSubTask.startProcess(XmlSubTask.java:227)
[hibernatedoclet] at xdoclet.modules.hibernate.HibernateSubTask.execute(HibernateSubTask.java:123)
[hibernatedoclet] at xdoclet.XDocletMain.start(XDocletMain.java:48)
[hibernatedoclet] at xdoclet.DocletTask.start(DocletTask.java:468)
[hibernatedoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:105)
[hibernatedoclet] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[hibernatedoclet] at org.apache.tools.ant.Task.perform(Task.java:364)
[hibernatedoclet] at org.apache.tools.ant.Target.execute(Target.java:341)
[hibernatedoclet] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[hibernatedoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
[hibernatedoclet] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:385)
[hibernatedoclet] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:136)
BUILD FAILED: C:\Projetos\framework-ANP\HibernateLocal.xml:58: Unexpected error
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
I'm trying to use idbag, but i can't. The code is below:
/**
* @hibernate.idbag table="menu" lazy="true"
* @hibernate.collection-id type="long" column="idMenu"
* @hibernate.generator-param name="sequence" value="IdMenu"
* @hibernate.collection-key column="IDmenuPai"
* @hibernate.collection-element type="string" column="nomefisico" not-null="true"
*/
I don't understand what happened. Anybody Help me?