HIBERNATE 报 Association references unmapped class

来源:互联网 发布:酷客网络代刷网 编辑:程序博客网 时间:2024/06/10 07:05
[main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.MySQLDialect
Exception in thread "main" org.hibernate.MappingException: Association references unmapped class:  com.habuma.spitter.domain.Comment
at org.hibernate.cfg.HbmBinder.bindCollectionSecondPass(HbmBinder.java:2399)
at org.hibernate.cfg.HbmBinder$CollectionSecondPass.secondPass(HbmBinder.java:2678)
at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:66)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1177)
at org.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:803)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:128)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:91)

at com.habuma.spitter.utils.CreateTable.main(CreateTable.java:10)


查看类和文件没有任何错误,经过几番检查终于找到了问题


有一个空格在配置类的过程中。 去掉这个空格就好了。

0 0
原创粉丝点击