facebook

Can not see hibernate Console Configurations

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #251131 Reply

    Craig
    Member

    I’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

    #251145 Reply

    Haris Peco
    Member

    Craig,

    You use hibernate tools, probably. MyEclipse haven’t hibernate perspective

    Best regards

    #251152 Reply

    Craig
    Member

    Thanks 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?

    #251157 Reply

    Haris Peco
    Member

    Craig,

    You have tried with annotation configuration and myeclipse doesn’t support annotation configuration (ejb3) for now.You have to use xml mapping (Configuration)

    Best

    #251162 Reply

    Craig
    Member

    You 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 found

    I think I’m close to being able to make my first HQL query, if you could just help me get over this hurdle.

    #251168 Reply

    Haris Peco
    Member

    Craig,

    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 program

    I 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 file

    Q: do you use myeclipse 4.1.1 ?

    Best

    #251173 Reply

    Craig
    Member

    OK. 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

    #251202 Reply

    Haris Peco
    Member

    Craig,

    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 tables

    You 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

    #251211 Reply

    Craig
    Member

    That makes sense. Thanks a lot.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Can not see hibernate Console Configurations

You must be logged in to post in the forum log in