0

您好,我正在尝试使用 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 .............................

每个我都像在文档中所说的那样配置了插件:http: //jcatalog.github.io/weceem-plugin/guide/2.ConfigurationAndInstallation.html ,我还从以下位置运行 weceemapp 演示:https ://github.com /julyantonicheva/weceem-app它运行良好。所以我看不到未映射的参考类,就像它说的可能有人遇到过这个错误。

在插件之前有点精确,应用程序运行良好 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 问候

4

1 回答 1

0

Finnaly 我找到了解决方案。事实上,通过更新我的用户类,为 weceem.springsecurity.details.mapper 添加权限字段,它创建了 2 个权限字段,一个来自我的班级,一个来自插件。我为我的班级改变并把 rautorities 代替了现在解决的应用程序正在运行。观众的 tks

于 2017-03-24T10:45:28.130 回答