你好,我正在尝试使用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上说的那样,我和我还运行了weceemapp演示程序:https://github.com/julyantonicheva/weceem-app,它运行得很好。所以idon没有像它所说的那样看到未映射的引用类,可能有人曾经处理过这个错误。
在插件运行良好之前稍微精确一点,Grails2.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公司
发布于 2017-03-24 10:45:28
最后我找到了解决办法。实际上,通过更新我的用户类,为weceem.springsecurity.details.mapper添加自动字段,它创建了2个自动字段,一个来自我的类,一个来自插件。我改变了我的班级,把狂野,而不是自动,现在它解决了,应用程序正在运行。为观众提供tks
https://stackoverflow.com/questions/42985913
复制相似问题