org.hibernate.MappingException: Association references unmapped class:

INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
Exception in thread "main" java.lang.ExceptionInInitializerError
at set_compare.Hibernate_1Insert.main(Hibernate_1Insert.java:17)
Caused by: org.hibernate.MappingException: Association references unmapped class: set_compare.Student
at org.hibernate.cfg.HbmBinder.bindCollectionSecondPass(HbmBinder.java:2521)
at org.hibernate.cfg.HbmBinder$CollectionSecondPass.secondPass(HbmBinder.java:2807)
at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:69)
at org.hibernate.cfg.Configuration.originalSecondPassCompile(Configuration.java:1611)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1369)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1756)
at util.HibernateUtil.buildSessionFactory(HibernateUtil.java:19)
at util.HibernateUtil.<clinit>(HibernateUtil.java:13)
... 1 more


级联关联到没有被映射的类。

这种问题的原因一般都是包名或者类名写错。

我这里是把Team类的映射文件写好了,
但是Student类的映射文件里的类路径写错了。

你可能感兴趣的:(Hibernate)