facebook

Hibernate 3.0 xml validation problem

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #235647 Reply

    I created a java project, selected MyEclipse & Added Hibernate Capabilities. I was also able to create Database Profile, which connects to Oracle 10G. I am able to see all the tables, see table data etc.

    But When I selected some of the tables and tried to create Hibernate mappings, it creates *.hbm.xml files, which has xml validation errors. I looked at the *.hbm.files and made sure it is pointing to right dtd as shown below.

    ——————————————————————————
    <?xml version=”1.0″ encoding=’UTF-8′?>
    <!DOCTYPE hibernate-mapping PUBLIC
    “-//Hibernate/Hibernate Mapping DTD 3.0//EN”
    http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd&#8221; >
    ——————————————————————————-

    Also, I am getting following error, when I try to create Hibernate Session.

    org.hibernate.MappingException: Error reading resource: TestDelete.hbm.xml

    #235648 Reply

    My eclipse environment is as follows:

    Eclipse SDK

    Version: 3.1.0
    Build id: I20050627-1435

    ————————————-

    MyEclipse JSF Support

    Version: 3.9.310
    Build id: 20050808-4.0-Milestone-3

    Thanks

    #235719 Reply

    I was trying to create *.hbm.xml configuration files & persistence classes for tables without primary keys. I think that is the reason, I was getting validation errors. I tried with table with primary keeps and MyEclipse generated *.hbm.xml without any validation errors.

    #235720 Reply

    @maheshbangalore wrote:

    I was trying to create *.hbm.xml configuration files & persistence classes for tables without primary keys. I think that is the reason, I was getting validation errors. I tried with table with primary keys and MyEclipse generated *.hbm.xml without any validation errors.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Hibernate 3.0 xml validation problem

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