- This topic has 1 reply, 2 voices, and was last updated 19 years, 9 months ago by
Riyad Kalla.
-
AuthorPosts
-
gioacchinoMemberI’m using Eclipse 3.1.0 and MyEclipse 4.0.3 GA and i have some trouble generating the xml file from a java bean. I have a simple Cat bean (show below) and i would like to turn it in a hbm.xml file but when i click in “Run XDoclet” it doesn’t generate any file. It seems, that it can’t find the bean.
Here is my Cat bean:
****package src; /** * @hibernate.class table="CATS" */ public class Cat { private java.lang.Long id; /** * @hibernate.id generator-class="native" column="CAT_ID" */ public java.lang.Long getId() { return id; } public void setId(java.lang.Long id) { this.id=id; } }
*****
I put this file in a “src” package that is a subdirectory of my project.
Here is the output of the “Run XDoclet”:
******
Buildfile: C:\Documents and Settings\gmauri\workspace\KissDemo2\.xdoclet-build.tmp.xml
N65540:
_xdoclet_generation_:
BUILD SUCCESSFUL
Total time: 3 seconds
******In the project properties i’ve added only the support for hibernate 3 (property “version” changed from blank to “3.0”). I’ve tried to implement Serializable in the java bean but i don’t suceeded, i’ve also tried to implement some constructors but .. nothing .. there is something obvious that i’m missing …
Thanks for any help.
November 2, 2005 at 8:53 am #240654
Riyad KallaMemberTry removing the doclet you added under Project Properties > MyEclipse-XDoclet. Then right click on the top box and click Standard then Hibernate. Then click OK and try and run it. You may need to go back and change version to 3.0 however, but that should atleast give you a hbm.xml file.
** NOTE: Please put your class in a package, not just the default package. Create a com/test folder or something and move your class into the new com.test package, so you have:
com.test.Cat
/src should be marked as a source dir in your Java Build Path Project properties, note that it is not a package, but your root source directory.
-
AuthorPosts