Hibernate3 hbm file incorrectly referencing a DTD file causes the project to fail to start problem handling

Source: Internet
Author: User

Error message:

Org.hibernate.InvalidMappingException:Could not parse mapping document from resource/***/****.hbm.xml

The project does not start properly, confirming that the hibernate mapping file exists.

Problem solving:

When the hibernate map file is generated backwards, the DTD file referenced by the header is "HTTP://WWW.HIBERNATE.ORG/DTD/HIBERNATE-MAPPING-3.0.DTD" and the original DTD file is "HTTP// Hibernate.sourceforge.net/hibernate-mapping-3.0.dtd ", manually modified to run normally.

Cause of the problem:

This problem can occur because the hibernate version selected at reverse generation is different from the Hibernate version currently in use, resulting in a different DTD being introduced, resulting in unresolved parsing.

The current project uses hibernate3.0, and the corresponding DTD file is in Hibernate3.jar.

Path: ORG/HIBERNATE/HIBERNATE-MAPPING-3.0.DTD

Hibernate3 hbm file incorrectly referencing a DTD file causes the project to fail to start problem handling

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.