Org.hibernate.MappingException:An Association from the table Order_intem_inf refers to a unmapped

Source: Internet
Author: User

The following error message appears when you run an example of hibernate

Exception in thread "main" Java.lang.ExceptionInInitializerError
At Com.hibernate.utils.hibernateutil.<clinit> (hibernateutil.java:21)
At Org.hibernate.samples.PersonManager.main (personmanager.java:23)
caused By:org.hibernate.MappingException:An Association from the table Order_intem_inf refers to an unmapped Class:prod Uct
At Org.hibernate.cfg.Configuration.secondPassCompileForeignKeys (configuration.java:1805)
At Org.hibernate.cfg.Configuration.originalSecondPassCompile (configuration.java:1739)
At Org.hibernate.cfg.Configuration.secondPassCompile (configuration.java:1424)
At Org.hibernate.cfg.Configuration.buildSessionFactory (configuration.java:1844)
At Org.hibernate.cfg.Configuration.buildSessionFactory (configuration.java:1928)
At Com.hibernate.utils.hibernateutil.<clinit> (hibernateutil.java:16)
... 1 more

From the error message, the class Product is not mapped to, but obviously the Product.hbm.xml file exists, and the mapping information is also filled out ah, and later the inspection found that it is in another reference to it only write "Product" instead of the full pathname.



Org.hibernate.MappingException:An Association from the table Order_intem_inf refers to a unmapped

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.