為什么測試的時候出現(xiàn)這個錯誤
Exception in thread "main" java.lang.ExceptionInInitializerError
at test.Test.main(Test.java:27)
Caused by: org.hibernate.MappingException: An association from the table proemp refers to an unmapped class: entity.Project
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 util.HibernateUtil.<clinit>(HibernateUtil.java:21)
... 1 more
2022-03-30
2017-10-15
hibernate.cfg.xml 沒有映射Project這個JavaBean。
2017-07-05
可以檢查一下配置文件,hibernate.cfg.xml ? ?
?An association from the table proemp refers to an unmapped class: entity.Project