About an association from the table refers to an unmapped class

Source: Internet
Author: User

Today, when configuring the SSH framework This exception, looked for a long time, only to find that the original is the Entity class mapping file <class name= "role" table= "role" > The name value is wrong, here summarizes some of the common online error reasons:

1. Check if <mapping resource= "Xxxx.hbm.xml" is added to your hibernate.cfg.xml file/>
2, check your hibernate.cfg.xml file for the associated two <mapping resource= ""/> Order, there may be one need to reference another, but the other is not compiled, that is used as a foreign key table to be placed in front
3. Check that your *.hbm.xml file name is correct
4, check your *.hbm.xml inside the class full name

About an association from the table refers to an unmapped class

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.