[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)
查看类和文件没有任何错误,经过几番检查终于找到了问题
有一个空格在配置类的过程中。 去掉这个空格就好了。