您好我正在尝试使用weceem插件但我收到错误: 消息:
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 org.hibernate.MappingException: Association references unmapped class: java.util.Set
Line | Method
->> 262 | run in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by 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 org.hibernate.MappingException: Association references unmapped class: java.util.Set
->> 262 | run in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.MappingException: Association references unmapped class: java.util.Set
->> 262 | run in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by MappingException: Association references unmapped class: java.util.Set
->> 45 | buildSessionFactory .............................
每个我都像在doc http://jcatalog.github.io/weceem-plugin/guide/2.ConfigurationAndInstallation.html上所说的那样配置了插件 我还运行了来自https://github.com/julyantonicheva/weceem-app的weceemapp演示,它运行良好。 因此,我们没有看到未映射的引用类,就像它说有人曾经遇到过这个错误。
插件前的一点精度应用程序运行良好 Grails 2.4.4 Windows 7的 Builconfig(最终为插件冲突)
plugins {
// plugins for the build system only
build ":tomcat:7.0.55"
// plugins for the compile step
compile ":scaffolding:2.1.2"
compile ':cache:1.1.8'
compile ":asset-pipeline:1.9.9"
// plugins needed at runtime but not for compilation
// runtime ":hibernate4:4.3.6.1" // or ":hibernate:3.6.10.18"
runtime ":hibernate:3.6.10.19"//for multi tenant
runtime ":database-migration:1.4.0"
runtime ":jquery:1.11.1"
//new
compile ":i18n-templates:1.1.0.1"
compile ":ckeditor:4.4.1.0"
// Uncomment these to enable additional asset-pipeline capabilities
//compile ":sass-asset-pipeline:1.9.0"
//compile ":less-asset-pipeline:1.10.0"
//compile ":coffee-asset-pipeline:1.8.0"
//compile ":handlebars-asset-pipeline:1.3.0.3"
//security
compile "org.grails.plugins:spring-security-core:2.0.0"
compile "org.grails.plugins:spring-security-ui:1.0-RC3"
compile "org.grails.plugins:mail:1.0.7"
//multi societe0.9.0-SNAPSHOT"
compile "org.grails.plugins:multi-tenant-single-db:0.8.3"
//excel import
compile ":excel-import:2.0.0.BUILD-SNAPSHOT"
//audit log
compile "org.grails.plugins:audit-logging:1.1.1"
//test weceem
compile ':weceem:1.4.1'
compile ":weceem-spring-security:1.4"
}
Tks问候
答案 0 :(得分:0)
Finnaly我找到了解决方案。 事实上,通过更新我的用户类为weceem.springsecurity.details.mapper添加autorities字段,它从我的类创建了2个autorities字段,从插件创建了一个。 我改变了我的课程,并将rautorities而不是autorities现在解决了应用程序正在运行。 tks for viewer