【发布时间】:2016-08-18 19:29:31
【问题描述】:
当尝试运行命令grails run-app --stacktrace 时,grails 抛出此错误:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.ClassCastException: org.grails.datastore.mapping.model.MappingFactory$10 cannot be cast to org.grails.datastore.mapping.model.types.ToMany
我从所有域类中评论了static hasMany,但错误仍然存在,直到我在我的build.gradle
如何使用 hibernate4 解决这个问题?
【问题讨论】:
标签: grails grails-orm datastore hibernate-4.x grails-3.1