Search code examples
grailsweceem

Can not run app with weceem plugin


Hello I'm trying to use weceem plugin but i got error: Message:

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 .............................

Every i've configured the plugin like it said on doc: http://jcatalog.github.io/weceem-plugin/guide/2.ConfigurationAndInstallation.html and i also run the weceemapp demo from :https://github.com/julyantonicheva/weceem-app and it were working well. So idon't see the unmapped reference class like it says may someone has ever mett this error.

A little precision before plugin the application were running well Grails 2.4.4 Windows 7 Builconfig (for conflict on plugin eventually)

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 regards


Solution

  • Finnaly i find the solution. In fact by updating my user class adding autorities field for weceem.springsecurity.details.mapper it created 2 autorities field one from my class and one from plugin. I change for my class and put rautorities instead of autorities now it's solved app is running. tks for viewers