-->
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.  [ 13 posts ] 
Author Message
 Post subject: xdoclet + id custom type troube
PostPosted: Mon Jun 20, 2005 11:31 am 
Newbie

Joined: Wed Jun 15, 2005 8:00 am
Posts: 16
Location: Munich, Germany
Is this a know malfunction?

Greetings,
M

Hibernate version:
3.0.5
XDoclet version:
1.2.2
Mapping documents:
not generated
Full stack trace of any exception that occurs:
[hibernatedoclet] xdoclet.template.TemplateException: Invoking method in class xdoclet.modules.hibernate.HibernateTagsHandler failed: ifHasCompositeId, line=169 of template file: jar:file:/usr/local/opt/xdoclet-1.2.3/lib/xdoclet-hibernate-module-1.2.3.jar!/xdoclet/modules/hibernate/resources/hibernate.xdt, exception: null
[hibernatedoclet] at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.java:580)
[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:136)
[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.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
[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.apache.tools.ant.Project.executeTargets(Project.java:1062)
[hibernatedoclet] at org.apache.tools.ant.Main.runBuild(Main.java:673)
[hibernatedoclet] at org.apache.tools.ant.Main.startAnt(Main.java:188)
[hibernatedoclet] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
[hibernatedoclet] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
[hibernatedoclet] xdoclet.template.TemplateException: Invoking method in class xdoclet.modules.hibernate.HibernateTagsHandler failed: ifHasCompositeId, line=169 of template file: jar:file:/usr/local/opt/xdoclet-1.2.3/lib/xdoclet-hibernate-module-1.2.3.jar!/xdoclet/modules/hibernate/resources/hibernate.xdt, exception: null
[hibernatedoclet] at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.java:580)
[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:136)
[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.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
[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.apache.tools.ant.Project.executeTargets(Project.java:1062)
[hibernatedoclet] at org.apache.tools.ant.Main.runBuild(Main.java:673)
[hibernatedoclet] at org.apache.tools.ant.Main.startAnt(Main.java:188)
[hibernatedoclet] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
[hibernatedoclet] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
[hibernatedoclet] /home/mr/workspace31/hibernate-egmxd/xdoclet-build.xml:38: 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.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
[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.apache.tools.ant.Project.executeTargets(Project.java:1062)
[hibernatedoclet] at org.apache.tools.ant.Main.runBuild(Main.java:673)
[hibernatedoclet] at org.apache.tools.ant.Main.startAnt(Main.java:188)
[hibernatedoclet] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
[hibernatedoclet] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
[hibernatedoclet] Caused by: xdoclet.XDocletException: Running XDoclet failed.
[hibernatedoclet] at xdoclet.TemplateSubTask.generateForClass(TemplateSubTask.java:788)
[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:136)
[hibernatedoclet] at xdoclet.XDocletMain.start(XDocletMain.java:48)
[hibernatedoclet] at xdoclet.DocletTask.start(DocletTask.java:468)
[hibernatedoclet] ... 17 more
[hibernatedoclet] --- Nested Exception ---
[hibernatedoclet] xdoclet.XDocletException: Running XDoclet failed.
[hibernatedoclet] at xdoclet.TemplateSubTask.generateForClass(TemplateSubTask.java:788)
[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:136)
[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.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
[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.apache.tools.ant.Project.executeTargets(Project.java:1062)
[hibernatedoclet] at org.apache.tools.ant.Main.runBuild(Main.java:673)
[hibernatedoclet] at org.apache.tools.ant.Main.startAnt(Main.java:188)
[hibernatedoclet] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
[hibernatedoclet] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 22, 2005 10:54 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Provide a small sample that causes the problem so it can be reviewed. Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 23, 2005 7:56 am 
Newbie

Joined: Wed Jun 15, 2005 8:00 am
Posts: 16
Location: Munich, Germany
Hi David,
I sent you the example by mail because I consider it too lengthy to be pasted here.

Hope this helps,
M


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 24, 2005 8:40 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Thanks - when I have a moment I will have a look at it.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 12:23 pm 
Newbie

Joined: Fri Apr 16, 2004 11:48 am
Posts: 18
Got the same problem with Xdoclet 1.2.3 and also the latest 1.3 SNAPSHOT. Anyone any progress?

Thanks!!!!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 6:17 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Sorry been way to busy to look at this issue as yet. You can have a go at it if you wish.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 22, 2005 4:58 am 
Newbie

Joined: Fri Apr 16, 2004 11:48 am
Posts: 18
Hi David,

I only looked at the hibernate.xdt and it looks correct to me:

Code:
    <XDtHibernate:ifHasCompositeId>
        <composite-id
            name="<XDtMethod:propertyName/>"
            class="<XDtMethod:methodTagValue tagName="hibernate.id" paramName="class" default="<XDtMethod:methodType/>"/>"
            <XDtMethod:ifHasMethodTag tagName="hibernate.id" paramName="unsaved-value">
            unsaved-value="<XDtMethod:methodTagValue tagName="hibernate.id" paramName="unsaved-value" values="any,none"/>"
            </XDtMethod:ifHasMethodTag>
        >
        <XDtClass:pushClass value="<XDtMethod:methodType/>">
            <XDtMethod:forAllMethods superclasses="true" sort="true">
                 <XDtMethod:ifHasMethodTag tagName="hibernate.property">
                     <key-property
                        name="<XDtMethod:propertyName />"
                        type="<XDtMethod:methodTagValue tagName="hibernate.property" paramName="type" default="<XDtMethod:methodType/>"/>"
                        column="<XDtMethod:methodTagValue tagName="hibernate.property" paramName="column" default="<XDtMethod:propertyName/>"/>"
                       <XDtMethod:ifHasMethodTag tagName="hibernate.property" paramName="length">
                        length="<XDtMethod:methodTagValue tagName="hibernate.property" paramName="length" />"
                       </XDtMethod:ifHasMethodTag>
                />
                </XDtMethod:ifHasMethodTag>

                <XDtMethod:ifHasMethodTag tagName="hibernate.many-to-one">
                    <key-many-to-one
                        name="<XDtMethod:propertyName/>"
                        class="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="class" default="<XDtMethod:methodType/>" />"
                        column="<XDtMethod:methodTagValue tagName="hibernate.many-to-one" paramName="column" default="<XDtMethod:propertyName/>"/>"
                    />
                </XDtMethod:ifHasMethodTag>
            </XDtMethod:forAllMethods>
        </XDtClass:pushClass>
        </composite-id>
    </XDtHibernate:ifHasCompositeId>

The best way to replicate this is to create a table in Oracle with a 2 column primary key and use middlegen against it and then run the Xdoclet. If you have any further suggestion I can hava a look.

Thanks!!!!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 04, 2005 4:49 am 
Newbie

Joined: Fri Apr 16, 2004 11:48 am
Posts: 18
I was wondering if anyone can at least confirm if this is still outstanding or if there is a fixed version or a patch available.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 04, 2005 5:05 am 
Newbie

Joined: Wed Jun 15, 2005 8:00 am
Posts: 16
Location: Munich, Germany
Hi David,
on Wed Sep 21 you said I could have a go. How can I?

Greetings,
M


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 04, 2005 6:29 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Things have been so hectic that I have not been able to scratch myself.
One comment though, XDoctlet can only work with composite keys in one mode while Middlgen can generate in both modes (where the tags are only guesses for the integrated key).


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 05, 2005 4:01 am 
Newbie

Joined: Wed Jun 15, 2005 8:00 am
Posts: 16
Location: Munich, Germany
Sorry, you lost me. Does that mean xdoclet cannot generate composite keys of custom type? Or can it? If so, what do I download to give it a try?

Greetings,
M


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 05, 2005 4:35 am 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
Maybe XDoclet 2 would be a solution to your problem. It definitely suports composite keys
as dedicated class ( if that is what you need ). And it is covered by unit testws, so you can use them as examples
( check http://xdoclet.codehaus.org )

regards,

_________________
Got new hibernate xdoclet plugin? http://www.sourceforge.net/projects/xdoclet-plugins/
... Momentan auf der Suche nach neuen Projekt ode Festanstellung....


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 05, 2005 4:52 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
If you can, please try the CVS version of 1.3.x Xdoclet (assuming you have not moved to Xdoclet 2). Xdoclet 1.x.x has always supported dedicated composite class as well, its the integrated composite key that is not supported. In anycase, lots of changes and updates etc have gone into the 1.3.x development effort.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 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.