metac0mak / spock

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

No signature of method: static SpecUtil.isRunnableSpec() is applicable for argument types: (java.lang.Class) #85

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem? If possible, provide source code and
stack trace.
1. grails create-app spocktest; cd spocktest; grails install-plugin spock
2. copy SampleSpec.groovy (attachment) to test/unit
3. grails test-app
4. Error executing script TestApp: groovy.lang.MissingMethodException: No 
signature of method: static 
org.spockframework.runtime.SpecUtil.isRunnableSpec() is applicable for 
argument types: (java.lang.Class) values: [class SampleSpec]

What version of Spock and Groovy are you using?

Grails 1.2.1, Spock plugin 0.4-SNAPSHOT
Ubuntu 9.10 32bit

Please provide any additional information below. You can also assign
labels.

Full stacktrace:

Error executing script TestApp: groovy.lang.MissingMethodException: No 
signature of method: static 
org.spockframework.runtime.SpecUtil.isRunnableSpec() is applicable for 
argument types: (java.lang.Class) values: [class SampleSpec]
gant.TargetExecutionException: groovy.lang.MissingMethodException: No 
signature of method: static 
org.spockframework.runtime.SpecUtil.isRunnableSpec() is applicable for 
argument types: (java.lang.Class) values: [class SampleSpec]
    at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:331)
    at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
    at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
    at gant.Gant.withBuildListeners(Gant.groovy:344)
    at gant.Gant.this$2$withBuildListeners(Gant.groovy)
    at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
    at gant.Gant.dispatch(Gant.groovy:334)
    at gant.Gant.this$2$dispatch(Gant.groovy)
    at gant.Gant.invokeMethod(Gant.groovy)
    at gant.Gant.processTargets(Gant.groovy:495)
    at gant.Gant.processTargets(Gant.groovy:480)
Caused by: groovy.lang.MissingMethodException: No signature of method: 
static org.spockframework.runtime.SpecUtil.isRunnableSpec() is applicable 
for argument types: (java.lang.Class) values: [class SampleSpec]
    at 
grails.plugin.spock.test.GrailsSpecTestType$_doPrepare_closure1.doCall(Grai
lsSpecTestType.groovy:53)
    at 
grails.plugin.spock.test.GrailsSpecTestType$_doPrepare_closure1.call(Grails
SpecTestType.groovy)
    at 
grails.plugin.spock.test.GrailsSpecTestType.doPrepare(GrailsSpecTestType.gr
oovy:51)
    at _GrailsTest_groovy$_run_closure4.doCall(_GrailsTest_groovy:260)
    at _GrailsTest_groovy$_run_closure4.call(_GrailsTest_groovy)
    at _GrailsTest_groovy$_run_closure2.doCall(_GrailsTest_groovy:229)
    at _GrailsTest_groovy$_run_closure2.call(_GrailsTest_groovy)
    at 
_GrailsTest_groovy$_run_closure1_closure21_closure25.doCall(_GrailsTest_gro
ovy:197)
    at 
_GrailsTest_groovy$_run_closure1_closure21.doCall(_GrailsTest_groovy:196)
    at _GrailsTest_groovy$_run_closure1.doCall(_GrailsTest_groovy:171)
    at TestApp$_run_closure1.doCall(TestApp.groovy:102)
    at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324)
    ... 10 more
Error executing script TestApp: groovy.lang.MissingMethodException: No 
signature of method: static 
org.spockframework.runtime.SpecUtil.isRunnableSpec() is applicable for 
argument types: (java.lang.Class) values: [class SampleSpec]

Original issue reported on code.google.com by robok...@gmail.com on 17 Mar 2010 at 12:34

Attachments:

GoogleCodeExporter commented 8 years ago
The strange thing about this is I have an application created a few weeks ago 
using 
Grails 1.2.1 + Spock plugin 0.4-SNAPSHOT and it works OK. However when I try to 
create 
a new application I always get the error I reported.

Original comment by robok...@gmail.com on 17 Mar 2010 at 12:43

GoogleCodeExporter commented 8 years ago
This error occurs if the latest snapshot version of the Grails Spock plugin is 
used together with an outdated 
version of spock-core. Grails/Ivy should download the latest spock-core version 
automatically, but it doesn't 
(see http://jira.codehaus.org/browse/GRAILS-5624). Please search for 
"spock-core-0.4-SNAPSHOT.jar" on your 
machine and delete the directory it is contained in. (If you find multiple 
occurrences, delete all of them.) The 
correct spock-core version should be downloaded the next time you build your 
project.
Please give us feedback if this solves your problem. The good news is that 0.4 
final, scheduled for end of March, 
won't have this problem because only snapshots are affected.

Original comment by pnied...@gmail.com on 17 Mar 2010 at 2:33

GoogleCodeExporter commented 8 years ago

Original comment by pnied...@gmail.com on 17 Mar 2010 at 2:34

GoogleCodeExporter commented 8 years ago
Problem solved as you suggested. I tried deleting ~/.grails before to get rid 
of 
downloaded jars, but it was ~/.ivy2 I needed to cleanup.

Thanks!

Original comment by robok...@gmail.com on 17 Mar 2010 at 4:00

GoogleCodeExporter commented 8 years ago
Glad to hear that cleaning the Ivy cache solved the problem.

Original comment by pnied...@gmail.com on 18 Mar 2010 at 5:16