geb-example-cucumber-jvm on github fails

358 views
Skip to first unread message

dean.delponte

unread,
Jun 9, 2015, 5:17:07 PM6/9/15
to geb-...@googlegroups.com
I've cloned the repo at https://github.com/geb/geb-example-cucumber-jvm and executed the tests with './gradle cucumber', but it fails.

I've run it with different Java versions (6, 7, 8) and even updated the dependencies to the latest versions, but it consistently fails with the same error.

Are others able to run the tests successfully?  Any idea of what I may be doing wrong?

Thanks for your help!

Here's the output when I execute the tests:

Enter code here.4:14:43 PM: Executing external task 'cucumber'...
:compileJava UP-TO-DATE
:compileGroovy UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar UP-TO-DATE
:assemble UP-TO-DATE
:compileTestJava UP-TO-DATE
:compileTestGroovy UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:compileCucumberJava UP-TO-DATE
:compileCucumberGroovy UP-TO-DATE
:processCucumberResources UP-TO-DATE
:cucumberClasses UP-TO-DATE
:downloadChromeDriver UP-TO-DATE
:unzipChromeDriver UP-TO-DATE
:downloadPhantomJs UP-TO-DATE
:unzipPhantomJs UP-TO-DATE
WARNING: Cucumber-JVM's --format option is deprecated. Please use --plugin instead.
WARNING: Cucumber-JVM's --format option is deprecated. Please use --plugin instead.
WARNING: Cucumber-JVM's --format option is deprecated. Please use --plugin instead.
:cucumber
# This example demonstrates using the custom steps written in
# src/cucumber/glue/steps
Feature: Geb web site navigation with custom steps
[31mFailure in before hook: [0m [31mNavigationStepsEN.groovy:41 [0m
[31mMessage: [0m [31mjava.lang.IllegalStateException: No packages set using either PageFinderSetup.setPackageNames or geb.cucumber.step.packages system property
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
at io.jdev.geb.cucumber.core.PageFinderSetup.initPackageNames(PageFinderSetup.groovy:36)
at io.jdev.geb.cucumber.core.PageFinderSetup.getPackageNames(PageFinderSetup.groovy:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1843)
at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3689)
at org.codehaus.groovy.runtime.callsite.ClassMetaClassGetPropertySite.getProperty(ClassMetaClassGetPropertySite.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)
at io.jdev.geb.cucumber.core.en.PageFinderEN.getInstance(PageFinderEN.groovy:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1843)
at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3689)
at org.codehaus.groovy.runtime.callsite.ClassMetaClassGetPropertySite.getProperty(ClassMetaClassGetPropertySite.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)
at io.jdev.geb.cucumber.steps.groovy.en.NavigationStepsEN$_run_closure1.doCall(NavigationStepsEN.groovy:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1015)
at groovy.lang.Closure.call(Closure.java:423)
at cucumber.runtime.groovy.GroovyBackend.invoke(GroovyBackend.java:155)
at cucumber.runtime.groovy.GroovyHookDefinition$1.call(GroovyHookDefinition.java:46)
at cucumber.runtime.Timeout.timeout(Timeout.java:13)
at cucumber.runtime.groovy.GroovyHookDefinition.execute(GroovyHookDefinition.java:43)
at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:222)
at cucumber.runtime.Runtime.runHooks(Runtime.java:210)
at cucumber.runtime.Runtime.runBeforeHooks(Runtime.java:200)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)
at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:163)
at cucumber.runtime.Runtime.run(Runtime.java:120)
at cucumber.api.cli.Main.run(Main.java:36)
at cucumber.api.cli.Main.main(Main.java:18)
[0m
      [31mjava.lang.IllegalStateException: No packages set using either PageFinderSetup.setPackageNames or geb.cucumber.step.packages system property
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
      at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
      at io.jdev.geb.cucumber.core.PageFinderSetup.initPackageNames(PageFinderSetup.groovy:36)
      at io.jdev.geb.cucumber.core.PageFinderSetup.getPackageNames(PageFinderSetup.groovy:42)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
      at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1843)
      at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3689)
      at org.codehaus.groovy.runtime.callsite.ClassMetaClassGetPropertySite.getProperty(ClassMetaClassGetPropertySite.java:48)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)
      at io.jdev.geb.cucumber.core.en.PageFinderEN.getInstance(PageFinderEN.groovy:48)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
      at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1843)
      at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3689)
      at org.codehaus.groovy.runtime.callsite.ClassMetaClassGetPropertySite.getProperty(ClassMetaClassGetPropertySite.java:48)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)
      at io.jdev.geb.cucumber.steps.groovy.en.NavigationStepsEN$_run_closure1.doCall(NavigationStepsEN.groovy:42)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1015)
      at groovy.lang.Closure.call(Closure.java:423)
      at cucumber.runtime.groovy.GroovyBackend.invoke(GroovyBackend.java:155)
      at cucumber.runtime.groovy.GroovyHookDefinition$1.call(GroovyHookDefinition.java:46)
      at cucumber.runtime.Timeout.timeout(Timeout.java:13)
      at cucumber.runtime.groovy.GroovyHookDefinition.execute(GroovyHookDefinition.java:43)
      at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:222)
      at cucumber.runtime.Runtime.runHooks(Runtime.java:210)
      at cucumber.runtime.Runtime.runBeforeHooks(Runtime.java:200)
      at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)
      at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:163)
      at cucumber.runtime.Runtime.run(Runtime.java:120)
      at cucumber.api.cli.Main.run(Main.java:36)
      at cucumber.api.cli.Main.main(Main.java:18)
      [0m
[31mFailure in after hook: [0m [31menv.groovy:27 [0m
[31mMessage: [0m [31mjava.lang.NullPointerException: Cannot invoke method remove() on null object
at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:88)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at env$_run_closure2.doCall(env.groovy:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1015)
at groovy.lang.Closure.call(Closure.java:423)
at cucumber.runtime.groovy.GroovyBackend.invoke(GroovyBackend.java:155)
at cucumber.runtime.groovy.GroovyHookDefinition$1.call(GroovyHookDefinition.java:46)
at cucumber.runtime.Timeout.timeout(Timeout.java:13)
at cucumber.runtime.groovy.GroovyHookDefinition.execute(GroovyHookDefinition.java:43)
at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:222)
at cucumber.runtime.Runtime.runHooks(Runtime.java:210)
at cucumber.runtime.Runtime.runAfterHooks(Runtime.java:204)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:50)
at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:163)
at cucumber.runtime.Runtime.run(Runtime.java:120)
at cucumber.api.cli.Main.run(Main.java:36)
at cucumber.api.cli.Main.main(Main.java:18)
[0m
      [31mjava.lang.NullPointerException: Cannot invoke method remove() on null object
      at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:88)
      at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
      at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
      at env$_run_closure2.doCall(env.groovy:28)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1015)
      at groovy.lang.Closure.call(Closure.java:423)
      at cucumber.runtime.groovy.GroovyBackend.invoke(GroovyBackend.java:155)
      at cucumber.runtime.groovy.GroovyHookDefinition$1.call(GroovyHookDefinition.java:46)
      at cucumber.runtime.Timeout.timeout(Timeout.java:13)
      at cucumber.runtime.groovy.GroovyHookDefinition.execute(GroovyHookDefinition.java:43)
      at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:222)
      at cucumber.runtime.Runtime.runHooks(Runtime.java:210)
      at cucumber.runtime.Runtime.runAfterHooks(Runtime.java:204)
      at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:50)
      at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:163)
      at cucumber.runtime.Runtime.run(Runtime.java:120)
      at cucumber.api.cli.Main.run(Main.java:36)
      at cucumber.api.cli.Main.main(Main.java:18)
      [0m

  Scenario: Find what I'm looking for with custom steps               [90m# features/gebish-custom.feature:6 [0m
    [36mGiven [0m [36mI am on the Geb home page [0m                                   [90m# gebish_steps.groovy:9 [0m
    [36mThen [0m [36mthe first heading on the page is ' [0m [36m [1mWhat is it? [0m [36m' [0m               [90m# gebish_steps.groovy:13 [0m
    [36mWhen [0m [36mthe link to the cross browser page is clicked [0m               [90m# gebish_steps.groovy:17 [0m
    [36mThen [0m [36mthe first heading on the page is ' [0m [36m [1mCross Browser Automation [0m [36m' [0m [90m# gebish_steps.groovy:13 [0m
# This example demonstrates using the pre-built steps in the
# geb-cucumber library
Feature: Geb web site navigation with prebuilt steps
[31mFailure in after hook: [0m [31menv.groovy:27 [0m
[31mMessage: [0m [31mjava.lang.NullPointerException: Cannot invoke method remove() on null object
at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:88)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at env$_run_closure2.doCall(env.groovy:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1015)
at groovy.lang.Closure.call(Closure.java:423)
at cucumber.runtime.groovy.GroovyBackend.invoke(GroovyBackend.java:155)
at cucumber.runtime.groovy.GroovyHookDefinition$1.call(GroovyHookDefinition.java:46)
at cucumber.runtime.Timeout.timeout(Timeout.java:13)
at cucumber.runtime.groovy.GroovyHookDefinition.execute(GroovyHookDefinition.java:43)
at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:222)
at cucumber.runtime.Runtime.runHooks(Runtime.java:210)
at cucumber.runtime.Runtime.runAfterHooks(Runtime.java:204)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:50)
at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:163)
at cucumber.runtime.Runtime.run(Runtime.java:120)
at cucumber.api.cli.Main.run(Main.java:36)
at cucumber.api.cli.Main.main(Main.java:18)
[0m
      [31mjava.lang.NullPointerException: Cannot invoke method remove() on null object
      at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:88)
      at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
      at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
      at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
      at env$_run_closure2.doCall(env.groovy:28)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1015)
      at groovy.lang.Closure.call(Closure.java:423)
      at cucumber.runtime.groovy.GroovyBackend.invoke(GroovyBackend.java:155)
      at cucumber.runtime.groovy.GroovyHookDefinition$1.call(GroovyHookDefinition.java:46)
      at cucumber.runtime.Timeout.timeout(Timeout.java:13)
      at cucumber.runtime.groovy.GroovyHookDefinition.execute(GroovyHookDefinition.java:43)
      at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:222)
      at cucumber.runtime.Runtime.runHooks(Runtime.java:210)
      at cucumber.runtime.Runtime.runAfterHooks(Runtime.java:204)
      at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:50)
      at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:163)
      at cucumber.runtime.Runtime.run(Runtime.java:120)
      at cucumber.api.cli.Main.run(Main.java:36)
      at cucumber.api.cli.Main.main(Main.java:18)
      [0m

  Scenario: Find what I'm looking for with prebuilt steps           [90m# features/gebish-prebuilt.feature:6 [0m
    [32mWhen [0m [32mI go to the [0m [32m [1mGeb home page [0m                                   [90m# NavigationStepsEN.groovy:49 [0m
    [32mThen [0m [32mthe [0m [32m [1mfirst heading [0m [32m has the value [0m [32m [1m'What is it?' [0m               [90m# InteractionStepsEN.groovy:69 [0m
    [32mWhen [0m [32mI click the [0m [32m [1mcross browser link [0m                             [90m# InteractionStepsEN.groovy:89 [0m
    [32mThen [0m [32mthe [0m [32m [1mfirst heading [0m [32m has the value [0m [32m [1m'Cross Browser Automation' [0m [90m# InteractionStepsEN.groovy:69 [0m

2 Scenarios ( [31m2 failed [0m)
8 Steps ( [36m4 skipped [0m, [32m4 passed [0m)
0m5.763s

java.lang.IllegalStateException: No packages set using either PageFinderSetup.setPackageNames or geb.cucumber.step.packages system property
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
at io.jdev.geb.cucumber.core.PageFinderSetup.initPackageNames(PageFinderSetup.groovy:36)
at io.jdev.geb.cucumber.core.PageFinderSetup.getPackageNames(PageFinderSetup.groovy:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1843)
at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3689)
at org.codehaus.groovy.runtime.callsite.ClassMetaClassGetPropertySite.getProperty(ClassMetaClassGetPropertySite.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)
at io.jdev.geb.cucumber.core.en.PageFinderEN.getInstance(PageFinderEN.groovy:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1843)
at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3689)
at org.codehaus.groovy.runtime.callsite.ClassMetaClassGetPropertySite.getProperty(ClassMetaClassGetPropertySite.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)
at io.jdev.geb.cucumber.steps.groovy.en.NavigationStepsEN$_run_closure1.doCall(NavigationStepsEN.groovy:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1015)
at groovy.lang.Closure.call(Closure.java:423)
at cucumber.runtime.groovy.GroovyBackend.invoke(GroovyBackend.java:155)
at cucumber.runtime.groovy.GroovyHookDefinition$1.call(GroovyHookDefinition.java:46)
at cucumber.runtime.Timeout.timeout(Timeout.java:13)
at cucumber.runtime.groovy.GroovyHookDefinition.execute(GroovyHookDefinition.java:43)
at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:222)
at cucumber.runtime.Runtime.runHooks(Runtime.java:210)
at cucumber.runtime.Runtime.runBeforeHooks(Runtime.java:200)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)
at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:163)
at cucumber.runtime.Runtime.run(Runtime.java:120)
at cucumber.api.cli.Main.run(Main.java:36)
at cucumber.api.cli.Main.main(Main.java:18)

java.lang.NullPointerException: Cannot invoke method remove() on null object
at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:88)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at env$_run_closure2.doCall(env.groovy:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1015)
at groovy.lang.Closure.call(Closure.java:423)
at cucumber.runtime.groovy.GroovyBackend.invoke(GroovyBackend.java:155)
at cucumber.runtime.groovy.GroovyHookDefinition$1.call(GroovyHookDefinition.java:46)
at cucumber.runtime.Timeout.timeout(Timeout.java:13)
at cucumber.runtime.groovy.GroovyHookDefinition.execute(GroovyHookDefinition.java:43)
at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:222)
at cucumber.runtime.Runtime.runHooks(Runtime.java:210)
at cucumber.runtime.Runtime.runAfterHooks(Runtime.java:204)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:50)
at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:163)
at cucumber.runtime.Runtime.run(Runtime.java:120)
at cucumber.api.cli.Main.run(Main.java:36)
at cucumber.api.cli.Main.main(Main.java:18)

java.lang.NullPointerException: Cannot invoke method remove() on null object
at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:88)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at env$_run_closure2.doCall(env.groovy:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1015)
at groovy.lang.Closure.call(Closure.java:423)
at cucumber.runtime.groovy.GroovyBackend.invoke(GroovyBackend.java:155)
at cucumber.runtime.groovy.GroovyHookDefinition$1.call(GroovyHookDefinition.java:46)
at cucumber.runtime.Timeout.timeout(Timeout.java:13)
at cucumber.runtime.groovy.GroovyHookDefinition.execute(GroovyHookDefinition.java:43)
at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:222)
at cucumber.runtime.Runtime.runHooks(Runtime.java:210)
at cucumber.runtime.Runtime.runAfterHooks(Runtime.java:204)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:50)
at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:163)
at cucumber.runtime.Runtime.run(Runtime.java:120)
at cucumber.api.cli.Main.run(Main.java:36)
at cucumber.api.cli.Main.main(Main.java:18)

:cucumber FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':cucumber'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 9.969 secs
Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
4:14:53 PM: External task execution finished 'cucumber'.
..


Brian Kotek

unread,
Jun 9, 2015, 6:19:22 PM6/9/15
to geb-...@googlegroups.com
​Does it build correctly if you use the included Gradle wrapper (gradlew)?​

dean.delponte

unread,
Jun 9, 2015, 10:53:41 PM6/9/15
to geb-...@googlegroups.com
Yes, clean and build work as expected:

Enter code here...Dean-OPI-2:geb-example-cucumber-jvm deandelponte$ ./gradlew clean

Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true

:clean


BUILD SUCCESSFUL


Total time: 4.589 secs

Dean-OPI-2:geb-example-cucumber-jvm deandelponte$ ./gradlew build

Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true

:compileJava UP-TO-DATE

:compileGroovy UP-TO-DATE

:processResources UP-TO-DATE

:classes UP-TO-DATE

:jar

:assemble

:compileTestJava UP-TO-DATE

:compileTestGroovy

Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true

:processTestResources

:testClasses

:test

:check

:build


BUILD SUCCESSFUL


Total time: 6.22 secs

Dean-OPI-2:geb-example-cucumber-jvm deandelponte$ 

Marcin Erdmann

unread,
Jun 10, 2015, 4:00:01 AM6/10/15
to geb-...@googlegroups.com
I've just cloned it locally and it's passing. It's also passing on the CI (https://drone.io/github.com/geb/geb-example-cucumber-jvm/latest) so I would say that this has something to do with your environment.

I don't know enough about cucumber to pinpoint it to be honest (the example has been contributed by Tom Dunstan) but by the looks of your stacktrace I would say it has something to do with the Before block in src/cucumber/resources/env/env.groovy not being executed for some reason. It's where geb.cucumber.step.packages system property is being set and where the bindingUpdater variable is being initialized (the second error, about not being able to call remove() on null pointer is thrown from here: https://github.com/geb/geb-example-cucumber-jvm/blob/master/src/cucumber/resources/env/env.groovy#L28).

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/a7c5e1ab-558a-41f1-a0e6-23f24d535726%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

dean.delponte

unread,
Jun 10, 2015, 10:22:56 AM6/10/15
to geb-...@googlegroups.com
Thanks, Marcin.

Just to verify, you are able to successfully run: ?
/gradew cucumber

I tried it on OS 10.10.3 with Java 6, 7, and 8.  Are you also using OS X?

Thanks very much for looking into this!

- Dean
...

Marcin Erdmann

unread,
Jun 10, 2015, 10:38:15 AM6/10/15
to geb-...@googlegroups.com
Yep, I'm running it on OS X on Java 7.

Erdi’s MacBook Pro:geb-example-cucumber-jvm erdi$ ./gradlew --version


------------------------------------------------------------

Gradle 2.1

------------------------------------------------------------


Build time:   2014-09-08 10:40:39 UTC

Build number: none

Revision:     e6cf70745ac11fa943e19294d19a2c527a669a53


Groovy:       2.3.6

Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013

JVM:          1.7.0_67 (Oracle Corporation 24.65-b04)

OS:           Mac OS X 10.10.3 x86_64


Erdi’s MacBook Pro:geb-example-cucumber-jvm erdi$ ./gradlew cucumber

:compileJava UP-TO-DATE

:compileGroovy UP-TO-DATE

:processResources UP-TO-DATE

:classes UP-TO-DATE

:jar UP-TO-DATE

:assemble UP-TO-DATE

:compileTestJava UP-TO-DATE

:compileTestGroovy

:processTestResources UP-TO-DATE

:testClasses

:compileCucumberJava UP-TO-DATE

:compileCucumberGroovy UP-TO-DATE

:processCucumberResources

:cucumberClasses

:downloadChromeDriver UP-TO-DATE

:unzipChromeDriver UP-TO-DATE

:downloadPhantomJs UP-TO-DATE

:unzipPhantomJs UP-TO-DATE

:cucumber

# This example demonstrates using the custom steps written in

# src/cucumber/glue/steps

Feature: Geb web site navigation with custom steps


  Scenario: Find what I'm looking for with custom steps              # features/gebish-custom.feature:6

    Given I am on the Geb home page                                  # gebish_steps.groovy:9

    Then the first heading on the page is 'What is it?'              # gebish_steps.groovy:13

    When the link to the cross browser page is clicked               # gebish_steps.groovy:17

    Then the first heading on the page is 'Cross Browser Automation' # gebish_steps.groovy:13

# This example demonstrates using the pre-built steps in the

# geb-cucumber library

Feature: Geb web site navigation with prebuilt steps


  Scenario: Find what I'm looking for with prebuilt steps           # features/gebish-prebuilt.feature:6

    When I go to the Geb home page                                  # NavigationStepsEN.groovy:25

    Then the first heading has the value 'What is it?'              # InteractionStepsEN.groovy:37

    When I click the cross browser link                             # InteractionStepsEN.groovy:57

    Then the first heading has the value 'Cross Browser Automation' # InteractionStepsEN.groovy:37


2 Scenarios (2 passed)

8 Steps (8 passed)

0m6.419s



BUILD SUCCESSFUL


Total time: 15.096 secs


--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.

dean.delponte

unread,
Jun 10, 2015, 3:09:14 PM6/10/15
to geb-...@googlegroups.com
I was able to successfully run it!  For whatever reason, the default Firefox driver blows things up.

Successfully ran with the command

./gradlew -Dgeb.env=chrome cucumber


Thanks everyone for your help!

- Dean

On Tuesday, June 9, 2015 at 4:17:07 PM UTC-5, dean.delponte wrote:
...

dean.delponte

unread,
Jun 10, 2015, 4:34:43 PM6/10/15
to geb-...@googlegroups.com
I was also able to verify that the issue is caused by cucumberJvm version 1.2.2.  

1.1.8 (which is the default in the project) and 1.2.0 work fine.  1.2.2 throws the errors I've shared in previous emails.

- Dean

On Tuesday, June 9, 2015 at 4:17:07 PM UTC-5, dean.delponte wrote:
...

Marcin Erdmann

unread,
Jun 10, 2015, 4:38:25 PM6/10/15
to geb-...@googlegroups.com
I thought that you just cloned the repo and tried running it. You probably should have mentioned that you changed some deps. :)

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.

dean.delponte

unread,
Jun 10, 2015, 5:36:59 PM6/10/15
to geb-...@googlegroups.com
Yes, sorry for not being more clear.

I did initially just clone the repo and try running it and it did fail but with different errors than what I previously posted.  

After it failed, that's when I started updating dependencies in an attempt to fix the problem and posted the errors I was receiving.

Eventually I just wiped everything out and started over, running everything from the command line and it worked as expected.

I will make a concerted effort to provide more details next time.

Thanks again for your help!  :)

- Dean

On Tuesday, June 9, 2015 at 4:17:07 PM UTC-5, dean.delponte wrote:
...

Marcin Erdmann

unread,
Jun 10, 2015, 6:07:54 PM6/10/15
to geb-...@googlegroups.com
No worries. I'm sure that you know that I was joking about changing these deps to introduce some confusion, right:)? Glad that you got it sorted in the end. And thanks for the PR, will merge it when I get a while.

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.

panzy goyal

unread,
Oct 26, 2016, 3:03:08 AM10/26/16
to Geb User Mailing List
Same kind of issue I am facing with SauceLab Connect connectivity. Its not able to use sauceDriver instance as driver. While driver is given local instance it's able to run it properly.

Tried below solutions but facing challenges:
1. run gradle clean task
2. tried with changing cucumberJvmVersion= '1.2.0'

Error:
This example demonstrates using the custom steps written in
# src/cucumber/glue/steps
Feature: Geb web site navigation with custom steps
[31mFailure in before hook: [0m [31mInteractionStepsEN.groovy:41 [0m
[31mMessage: [0m [31mgeb.driver.DriverCreationException: failed to create driver from callback 'script1477464718729301789789$_run_closure1@6fa590ba'

Any Pointers or project available for saucelab integration with geb-example-cucumber-jvm project

-----------------------

Marcin Erdmann

unread,
Nov 1, 2016, 5:06:07 PM11/1/16
to Geb User Mailing List
Hi Panzy,

Can you please provide full stacktrace of the DriverCreationException you're getting? It's hard to understand what the exact problem is without it.

Cheers,
Marcin

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+unsubscribe@googlegroups.com.

To post to this group, send email to geb-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages