facebook

[Closed] Hibernate versions out of sync

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

    Rob Rutherford
    Participant

    Hello,

    I’ve been getting some strange problems with hibernate, the message:
    12:24:55 ERROR Error.
    org.hibernate.MappingException: Bad identifier type: class

    shows that.

    I have, Hibernate 3 jars, and .hbm.xml files installed, but MyEclipse shows hibernate 2.1 when I bring up the Hibernate configuration. (My DTDs are also referencing hibernate 3 and I have the hibernate3.jar in my project.)

    How do I make sure that everything is Hibernate 3?

    #248637 Reply

    Riyad Kalla
    Member

    As long as you are sure everything is Hibernate 3, open up your navigator view and open the .myhibernatedata file, then change the “version” to 3.0, like this:
    version=3.0

    #248650 Reply

    Rob Rutherford
    Participant

    Riyad,

    Now that you tell me how to fix the problem I can see that the project doesn’t have a .myhibernatedata file.

    I will copy the file from a different project and edit it.

    Thanks
    Rob

    #248664 Reply

    Riyad Kalla
    Member

    Rob,
    You need to add Hibernate Capabilities to the project. Simply copying that isn’t enough (I don’t think). You also need a hibernate builder and hibernate nature. If you want to do this all manually, you need to add the following build command to your .project file:

    
    <buildCommand>
      <name>com.genuitec.eclipse.hibernate.HibernateBuilder</name>
        <arguments>
        </arguments>
    </buildCommand>
    

    and a new nature:

    
    <nature>com.genuitec.eclipse.hibernate.hibernatenature</nature>
    
    #248731 Reply

    Rob Rutherford
    Participant

    Riyad,

    I got the changes in, the project already had the hibernate nature and build Command in it,
    The only thing missing was the .myhibernatedata file. Very strange.

    I thought about adding the hibernate nature to the project, but since it was in the .project file it was already there.

    Thanks

    Rob

    #248732 Reply

    Riyad Kalla
    Member

    Weird, sounds like the project canabalised itself. Are things working now?

    #248823 Reply

    Rob Rutherford
    Participant

    Its good now.

    Thanks

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: [Closed] Hibernate versions out of sync

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