jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Geb
  • GEB-129

Grails plugin fails with "SpecMetadata missing element line" for Grails 2.0.0.RC1

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 0.6.1
  • Fix Version/s: 0.6.3
  • Component/s: Grails Plugin
  • Labels:
    • Grails2.0.0.RC1
    • SpecMetadata
  • Environment:
    Mac OSX 10.6.8. Grails 2.0.0.RC1. Geb 0.6.x. Spock 0.6-SNAPSHOT. Webdriver 2.0.rc3 - 2.9.0
  • Testcase included:
    yes

Description

When upgrading a Grails2.0.0.M2 project to RC1, the Geb plugin fails with the error below. Note that I have tried using various versions of Geb, Spock and Webdriver/Selenium and all yield the same error for Grails 2.RC1. Downgrading to Grails 2.M2 allows the functional tests to run. There is no problem with Spock unit tests, only Geb/Spock functional tests. Sample project attached.

Loading Grails 2.0.0.RC1
Configuring classpath.
Environment set to test.....
Running 1 spock test...
Completed 1 spock test, 0 failed in 2979ms
Packaging Grails application.....
Error 2011-10-27 10:05:45,205 [main] ERROR util.Holders - No thread-bound ServletContext found, returning singleton
Error 2011-10-27 10:05:45,220 [main] ERROR util.Holders - No thread-bound ServletContext found, returning singleton
Packaging Grails application.....
Running Grails application
Server running. Browse to tok2-block-tok
Running 1 spock test...
Error Error running spock tests: org.spockframework.runtime.model.SpecMetadata missing element line (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.lang.annotation.IncompleteAnnotationException: org.spockframework.runtime.model.SpecMetadata missing element line
at $Proxy7.line(Unknown Source)
at org.spockframework.runtime.SpecInfoBuilder.buildSpec(SpecInfoBuilder.java:80)
at org.spockframework.runtime.SpecInfoBuilder.doBuild(SpecInfoBuilder.java:56)
at org.spockframework.runtime.SpecInfoBuilder.buildSuperSpec(SpecInfoBuilder.java:69)
at org.spockframework.runtime.SpecInfoBuilder.doBuild(SpecInfoBuilder.java:55)
at org.spockframework.runtime.SpecInfoBuilder.build(SpecInfoBuilder.java:42)
at org.spockframework.runtime.Sputnik.getSpec(Sputnik.java:72)
at org.spockframework.runtime.Sputnik.runExtensionsIfNecessary(Sputnik.java:80)
at org.spockframework.runtime.Sputnik.getDescription(Sputnik.java:49)
at org.junit.runners.Suite.describeChild(Suite.java:123)
at org.junit.runners.Suite.describeChild(Suite.java:24)
at org.junit.runners.ParentRunner.getDescription(ParentRunner.java:290)
at org.junit.runner.JUnitCore.run(JUnitCore.java:156)
at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
at grails.plugin.spock.test.GrailsSpecTestType.doRun(GrailsSpecTestType.groovy:68)
at _GrailsTest_groovy$_run_closure4.doCall(_GrailsTest_groovy:285)
at _GrailsTest_groovy$_run_closure4.call(_GrailsTest_groovy)
at _GrailsTest_groovy$_run_closure2.doCall(_GrailsTest_groovy:243)
at _GrailsTest_groovy$_run_closure1_closure21.doCall(_GrailsTest_groovy:190)
at _GrailsTest_groovy$_run_closure1.doCall(_GrailsTest_groovy:179)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at TestApp$_run_closure1.doCall(TestApp.groovy:82)
at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:591)
at gant.Gant.executeTargets(Gant.groovy:590)
Error Error running spock tests: org.spockframework.runtime.model.SpecMetadata missing element line
Running 1 spock test.....
Server stopped
Tests FAILED - view reports in target/test-reports
  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. File
    GebErrorGrails2RC1.tar.bz2
    27/Oct/11 3:17 AM
    393 kB
    Colin Webber

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Russell Wilson added a comment - 27/Oct/11 10:37 AM

I'm having the same problem

Show
Russell Wilson added a comment - 27/Oct/11 10:37 AM I'm having the same problem
Hide
Permalink
Luke Daley added a comment - 27/Oct/11 1:22 PM

The problem is that there was a change to Spock's transforms, which means all specs need to be recompiled. It will be a few days before I can fix this.

As an extreme workaround, copy the two classes from https://github.com/geb/geb/tree/master/module/geb-spock/src/main/groovy/geb/spock and rename them, then change your tests to use these.

Show
Luke Daley added a comment - 27/Oct/11 1:22 PM The problem is that there was a change to Spock's transforms, which means all specs need to be recompiled. It will be a few days before I can fix this. As an extreme workaround, copy the two classes from https://github.com/geb/geb/tree/master/module/geb-spock/src/main/groovy/geb/spock and rename them, then change your tests to use these.
Hide
Permalink
Russell Wilson added a comment - 27/Oct/11 3:55 PM

Thanks for the speedy response Luke. Extreme workaround success.

Show
Russell Wilson added a comment - 27/Oct/11 3:55 PM Thanks for the speedy response Luke. Extreme workaround success.
Hide
Permalink
Colin Webber added a comment - 28/Oct/11 3:50 AM

Works like a charm - thanks!

Show
Colin Webber added a comment - 28/Oct/11 3:50 AM Works like a charm - thanks!
Hide
Permalink
Leonid Vysochyn added a comment - 20/Dec/11 9:54 AM

We experience the same issue and cannot use Geb with Grails 2.0.0 because of it.
Is there any ETA when we can expect it to be fixed?

Show
Leonid Vysochyn added a comment - 20/Dec/11 9:54 AM We experience the same issue and cannot use Geb with Grails 2.0.0 because of it. Is there any ETA when we can expect it to be fixed?
Hide
Permalink
Luke Daley added a comment - 20/Dec/11 10:54 AM

@Leonid: no solid ETA, but not long.

You can employ the workaround above in the meantime.

Show
Luke Daley added a comment - 20/Dec/11 10:54 AM @Leonid: no solid ETA, but not long. You can employ the workaround above in the meantime.
Hide
Permalink
Bobby added a comment - 12/Jan/12 9:14 AM

Confirmed the workaround works - copied the two classes to my project's test/functional dir, removed the package designations on them, renamed to <Something>GepSpec and <Something>GebReportingSpec. Then changed my specs to inherit from <Something>GebReportingSpec instead of GebReportingSpec. Worked like a charm.

I suppose I'll watch this ticket for the real fix? Thanks for the workaround!

Show
Bobby added a comment - 12/Jan/12 9:14 AM Confirmed the workaround works - copied the two classes to my project's test/functional dir, removed the package designations on them, renamed to <Something>GepSpec and <Something>GebReportingSpec. Then changed my specs to inherit from <Something>GebReportingSpec instead of GebReportingSpec. Worked like a charm. I suppose I'll watch this ticket for the real fix? Thanks for the workaround!
Hide
Permalink
Luke Daley added a comment - 25/Jan/12 4:09 PM

Sorry guys, just realised there is no explanation here on what this is about.

There's an incompatibility with the compile time transforms between Spock 0.5 and Spock 0.6. As soon as Spock 0.6 is released we'll cut a release compiled against that and drop support for Spock 0.5 which will resolve this issue.

Show
Luke Daley added a comment - 25/Jan/12 4:09 PM Sorry guys, just realised there is no explanation here on what this is about. There's an incompatibility with the compile time transforms between Spock 0.5 and Spock 0.6. As soon as Spock 0.6 is released we'll cut a release compiled against that and drop support for Spock 0.5 which will resolve this issue.

People

  • Assignee:
    Luke Daley
    Reporter:
    Colin Webber
Vote (15)
Watch (16)

Dates

  • Created:
    27/Oct/11 3:17 AM
    Updated:
    02/Mar/12 4:53 AM
    Resolved:
    02/Mar/12 4:53 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.