facebook

hibernate problems

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #215330 Reply

    I just started to use the hibernate tools but it seems they have lots of problems:

      After creating a new hibernate config the file is created but not written to the Project’s Properties->MyEclipse-Hibernate->ConfigFile
      When the hibernate config is FIRST generated it contains connection information. If it gets updated (because mapping files were generated – provided that it does that) the config file does contain the mapping files but all connection options are empty
      I now reached a point where I no longer can generate mappings: I get the error “Unable to update the Hibernate configuration file. Reason: unable to create a new XML configuration file’. Details: Invalid path: /hibernate.cfg.xml”. This is AFTER i have manually checked and fixed the project setting. If you look at .myhibernate you see that most keys have an empty value which seems problematic. Why are those settings not kept in/read from the hibernate config file?
      The few times I was able to generate mapping files I noticed that only many-to-one relations were generated, not the other types. Why?

    For now I’ll return to hibernate synchronizer….
    [/list]

    #215351 Reply

    Riyad Kalla
    Member

    I will report these to the hibernate developer, thank you for the comments.

    #215498 Reply

    support-jeff
    Member

    Looks like the .myhibernatedata issue that another user has reported on. Basically, the problem is not the config file, but rather a missing or corrupted .myhibernatedata file in the project root directory. We are looking at the issue.

    For now, could you try this:
    * remove .myhibernatedata from your project
    * remove the HibernateNature from the project (open .project in an editor and remove the line in the <nature> section referring to Hibernate)
    * now re-add Hibernate capabilities to the project (via MyEclipse -> Add Hibernate Capabilities) (you do not need to re-add libraries or re-create the config or sessionfactory files)
    * now retry adding mappings, etc.

    Does this work for you now?

    As for mapping relationships, currently only many-to-one is generated because it is the only generation that is straightforward to map from a database (via a foreign key). More options are forthcoming.

    #215639 Reply

    support-michael
    Keymaster

    I’ve been assigned to research this anomalous behavior and am having difficulty replicating it. Can you provide me simple sequence of actions that I can use to replicate this problem?

    Example:
    1) Create Java project (foo)
    2) Add hibernate capabilities to Foo
    3) From Database Browser view select table and right-click “Create Hibernate Mapping”
    ….

    #215873 Reply

    I will try to do that somewhere next week- I’m a bit busy right now. I returned to Hibernate Synchronizer for now so it’s not urgent anymore.

    #218071 Reply

    Update on this bug, w/200409171200-3.8.2

    I had this problem when I tried to switch databases for the project. I had hibernated it with an Oracle DB, then tried to switch to using a MySQL DB instead (with the same schema). Got that error when trying to regenerate.

    Not sure if that’s a bug, but it does seem to be impossible to switch DBs without removing the nature from the config.

    #218074 Reply

    Riyad Kalla
    Member

    I will forward this to Michael.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: hibernate problems

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