facebook

Hibernate validation error on new proj [Closed]

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #213575 Reply

    jrogers
    Member

    I created a project in Beta 3.8 with hibernate support and it worked fine. I updated per the instructions to 3.8.1. I get an error regarding the validity of the hibernate.cfg.xml file. I also did another install but downloaded the 3.8.1 GA release and added hibernate support. I’m still getting an invalid hibernate.cfg.xml file and it is in a different location from the beta version.

    I have my project in cvs and would like to not rebuild it. How do I fix the issue with the hibernate.cfg.xml and where is the proper location for it?

    Thanks

    #213577 Reply

    Riyad Kalla
    Member

    What is the error? What is the Build ID of Eclipse that you are using?

    #213581 Reply

    jrogers
    Member

    I am using GA 3.8.1 along with the quick fix patch.

    The error is:
    The content of element type “session-factory” is incomplete, it must match “(property*,mapping+,(class-cache|collection-cache|jcs-class-cache|jcs-collection-cache)*)”.

    #213592 Reply

    snpe
    Member

    send us hibernate.cfg.xml

    #213598 Reply

    Riyad Kalla
    Member

    I am using GA 3.8.1 along with the quick fix patch.

    Actually I wanted the Help > About > Eclipse Build ID number.

    The content of element type “session-factory” is incomplete, it must match “(property*,mapping+,(class-cache|collection-cache|jcs-class-cache|jcs-collection-cache)*)”.

    Does the content of session-factory match this rule? This seems to be a straight validation error… maybe you were editing the file and accidentally forgot a close tag or misquoted attribute somewhere?

    #213610 Reply

    jrogers
    Member

    Here is the build information:

    Eclipse Platform

    Version: 3.0.0
    Build id: 200406251208

    #213613 Reply

    Riyad Kalla
    Member

    That looks to be the correct build ID, what about the other question? Have you tried using another piece of software to validate this file and see if it is infact valid?

    #213617 Reply

    jrogers
    Member

    I think I found the answer. When I first add hibernate support to the project, the hibernate.cfg.xml fails validation because it contains no tags called mapping. Once I map an table to an entity, the errors disappear. Evidently, in earlier version, the validation of the xml file was not occuring or turned off. I’m good to go for now.

    #213619 Reply

    Riyad Kalla
    Member

    Glad to hear it’s working now.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Hibernate validation error on new proj [Closed]

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