thanneeruvenu / spock

Automatically exported from code.google.com/p/spock
0 stars 0 forks source link

The Spock compiler plugin cannot execute because Spock 0.7.0-groovy-1.8 is not compatible with Groovy 2.0.7 #328

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Error 2013-08-29 15:25:36,032 [localhost-startStop-1] ERROR 
context.GrailsContextLoader  - Error executing bootstraps: 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': Cannot resolve reference to bean 
'hibernateProperties' while setting bean property 'hibernateProperties'; nested 
exception is org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'hibernateProperties': Cannot resolve reference to bean 
'dialectDetector' while setting bean property 'properties' with key 
[hibernate.dialect]; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'dialectDetector': Invocation of init method failed; nested exception 
is 
org.codehaus.groovy.grails.orm.hibernate.exceptions.CouldNotDetermineHibernateDi
alectException: Could not determine Hibernate dialect for database name [H2]!
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': Cannot resolve reference to bean 
'hibernateProperties' while setting bean property 'hibernateProperties'; nested 
exception is org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'hibernateProperties': Cannot resolve reference to bean 
'dialectDetector' while setting bean property 'properties' with key 
[hibernate.dialect]; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'dialectDetector': Invocation of init method failed; nested exception 
is 
org.codehaus.groovy.grails.orm.hibernate.exceptions.CouldNotDetermineHibernateDi
alectException: Could not determine Hibernate dialect for database name [H2]!
    Line | Method
->>  334 | innerRun  in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    166 | run       in java.util.concurrent.FutureTask
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run       in java.util.concurrent.ThreadPoolExecutor$Worker
^    724 | 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': Cannot resolve reference to bean 
'hibernateProperties' while setting bean property 'hibernateProperties'; nested 
exception is org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'hibernateProperties': Cannot resolve reference to bean 
'dialectDetector' while setting bean property 'properties' with key 
[hibernate.dialect]; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'dialectDetector': Invocation of init method failed; nested exception 
is 
org.codehaus.groovy.grails.orm.hibernate.exceptions.CouldNotDetermineHibernateDi
alectException: Could not determine Hibernate dialect for database name [H2]!
->>  334 | innerRun  in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    166 | run       in java.util.concurrent.FutureTask
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run       in java.util.concurrent.ThreadPoolExecutor$Worker
^    724 | run . . . in java.lang.Thread
Caused by BeanCreationException: Error creating bean with name 
'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while 
setting bean property 'hibernateProperties'; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'hibernateProperties': Cannot resolve reference to bean 
'dialectDetector' while setting bean property 'properties' with key 
[hibernate.dialect]; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'dialectDetector': Invocation of init method failed; nested exception 
is 
org.codehaus.groovy.grails.orm.hibernate.exceptions.CouldNotDetermineHibernateDi
alectException: Could not determine Hibernate dialect for database name [H2]!
->>  334 | innerRun  in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    166 | run       in java.util.concurrent.FutureTask
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run       in java.util.concurrent.ThreadPoolExecutor$Worker
^    724 | run . . . in java.lang.Thread
Caused by BeanCreationException: Error creating bean with name 
'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while 
setting bean property 'properties' with key [hibernate.dialect]; nested 
exception is org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'dialectDetector': Invocation of init method failed; 
nested exception is 
org.codehaus.groovy.grails.orm.hibernate.exceptions.CouldNotDetermineHibernateDi
alectException: Could not determine Hibernate dialect for database name [H2]!
->>  334 | innerRun  in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    166 | run       in java.util.concurrent.FutureTask
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run       in java.util.concurrent.ThreadPoolExecutor$Worker
^    724 | run . . . in java.lang.Thread
Caused by BeanCreationException: Error creating bean with name 
'dialectDetector': Invocation of init method failed; nested exception is 
org.codehaus.groovy.grails.orm.hibernate.exceptions.CouldNotDetermineHibernateDi
alectException: Could not determine Hibernate dialect for database name [H2]!
->>  334 | innerRun  in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    166 | run       in java.util.concurrent.FutureTask
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run       in java.util.concurrent.ThreadPoolExecutor$Worker
^    724 | run . . . in java.lang.Thread
Caused by CouldNotDetermineHibernateDialectException: Could not determine 
Hibernate dialect for database name [H2]!
->>  334 | innerRun  in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    166 | run       in java.util.concurrent.FutureTask
|   1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    615 | run       in java.util.concurrent.ThreadPoolExecutor$Worker
^    724 | run . . . in java.lang.Thread

Original issue reported on code.google.com by rupendra...@optimusinfo.com on 29 Aug 2013 at 9:58

GoogleCodeExporter commented 8 years ago
Sounds like you haven't configured spock-grails correctly in 
BuildConfig.groovy. See http://grails.org/plugin/spock for details.

Original comment by pnied...@gmail.com on 29 Aug 2013 at 10:03

GoogleCodeExporter commented 8 years ago

Original comment by pnied...@gmail.com on 29 Aug 2013 at 10:04

GoogleCodeExporter commented 8 years ago
My BuildConfig.groovy looks like this:
 repositories {
        inherits true // Whether to inherit repository definitions from plugins

        grailsPlugins()
        grailsHome()
        grailsCentral()

        mavenLocal()
        mavenCentral()

        // uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
        //mavenRepo "http://snapshots.repository.codehaus.org"
        //mavenRepo "http://repository.codehaus.org"
        //mavenRepo "http://download.java.net/maven/2/"
        //mavenRepo "http://repository.jboss.com/maven2/"
    }
plugins {
        runtime ":hibernate:$grailsVersion"
        runtime ":jquery:1.8.0"
        runtime ":resources:1.1.6"

        // Uncomment these (or add new ones) to enable additional resources capabilities
        //runtime ":zipped-resources:1.0"
        //runtime ":cached-resources:1.0"
        //runtime ":yui-minify-resources:0.1.4"

        build ":tomcat:$grailsVersion"

        runtime ":database-migration:1.1"

        compile ':cache:1.0.0'

        // Custom
        test ":spock:0.7"

        compile ":spring-security-core:1.2.7.3"
        compile ":mail:1.0"
        compile ":jquery-ui:1.8.24"
        compile ":famfamfam:1.0.1"
        compile ":spring-security-ui:0.2"
        compile ':webxml:1.4.1'
        compile ":fixtures:1.1"
        compile ":spring-security-acl:1.1.1"
        compile ":spring-security-bcrypt:0.3"
        compile ":spring-security-twitter:0.5.4"

        //compile ":webflow:1.3.8"
        compile ':twitter-bootstrap:2.2.1'

        compile ":build-test-data:2.0.3"
        test ":code-coverage:1.2.5"

        compile "org.grails.plugins:functional-spock:0.6"
        compile "org.grails.plugins:grails-melody:1.13"
    }

Do I require anything else?

Original comment by rupendra...@optimusinfo.com on 29 Aug 2013 at 10:16

GoogleCodeExporter commented 8 years ago
Apparently one of your dependencies is pulling in Groovy 2.0.7, which you need 
to prevent (Grails 2.1.x is based on Groovy 1.8). I can't tell you how this is 
done in Grails; I recommend to check the Grails documentation.

Original comment by pnied...@gmail.com on 29 Aug 2013 at 10:19