当前位置:首页 > 开发 > 编程语言 > Hibernate > 正文

org.hibernate.MappingException: Association references unmapped class:

发表于: 2013-11-25   作者:alleni123   来源:转载   浏览:
摘要: INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException Exception in thread "main" java.lang.ExceptionInInitializ
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类的映射文件里的类路径写错了。

org.hibernate.MappingException: Association references unmapped class:

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号