- This topic has 8 replies, 2 voices, and was last updated 19 years ago by
Craig.
-
AuthorPosts
-
CraigMemberI’m sorry if this is obvious, but it’s driving me crazy.
I’m not sure why, but when I use the Hibernate perspective and/or File->View…., I get an empty list of hibernate configurations, although I have some created.
I then figured I’d just create a new one. If I use the name, I am told it already exists. If I create a new one, it lets me, but still does not show up on the list of configurations.
How do I make it visible?
WHere is this information stored?Thanks.
Craig
Haris PecoMemberCraig,
You use hibernate tools, probably. MyEclipse haven’t hibernate perspective
Best regards
CraigMemberThanks for the reply.
I am using Myeclipse with the hibernate plugin. THe Perspective I was refering to is called “Hibernate Console”. I fhtis is the wrong forum, let me know.I got around the initial issue by finding the workbench.xml had incorrect pointers to it.
Now, when I create the mapping tables, and try to create a session, I get a “Can not load AnnotationConfiguration”, and the file referenced seems to be there and can be seen via the hibernate.cfg.xml viewer.
It seems to reference the .metadata/.plugins/com.genuitec.org.hibernate.eclipse.console directory. Isn’t that part of myeclipse?
Haris PecoMemberCraig,
You have tried with annotation configuration and myeclipse doesn’t support annotation configuration (ejb3) for now.You have to use xml mapping (Configuration)
Best
CraigMemberYou are right. I thought I did not have that item checked off 🙂
However, I regenerated everything (I think).
The console configuration has mapping files including /myproject/src/pkgname/table_name.hbm.xml.
I can select it throught the ‘Add…’. and see it was just created (via explorer).
If I then go to the ‘Hibernate Configurations’, and select my sole configuration, I get a
MappingException: Resource pkgname/table_name.hbm.xml not foundI think I’m close to being able to make my first HQL query, if you could just help me get over this hurdle.
Haris PecoMemberCraig,
I want help you, but you mixed MyEclipse and hibernate tools
MyEclipse will support hql editor in next milestone
You can execute queries on standard hibernate in programI will try help you with hibernate tools,too
You have to make HT Console configuration and add bin directory of your project and your jdbc fileQ: do you use myeclipse 4.1.1 ?
Best
CraigMemberOK. I misunderstood. I thought you were saying the annotation (EJB3) was not supported.
I assumed that since the myeclipseide site has tutorials on using the tools, they were supported.
So, if I undertand correctly, you are suggesting I simply create the mapping files by hand instead of using the reverse engineering, and it should work. I actually did that on a smaller project outside eclipse, so I’m comfortable with that. I was hoping the tools would avoid some of the tedious tasks.
CR
Haris PecoMemberCraig,
No, i don’t suggest you that you make mapping files manual. MyEclipse make mapping files great and you just
call MyEclipse wizard (from db explorer) and no ‘hibernate tools’ wizard.
You can use hibernate tools and myeclipse version 4.1.1 (if you have vesrsion < 4.1.1 you have to remove hibernate tools)I suggest that you start with this :
– make simple java project
– add hibernate capabilities (i suggest hibernate 3.0)
– make connection profile and drivers in Db explorer (MyEclipse database persepective)
– expand to your tables , choose tables and call ‘Hibernate mapping wizard’
– you will got ready hibernate confgiuration file and mapping files for your tablesYou can add mapping files in your cfg.xml and start with simple HibernateUtil class from hibernate documentation
If you want hql editor then you have to wait for future milestone (in 2 weeks)
Best regards
CraigMemberThat makes sense. Thanks a lot.
-
AuthorPosts