14:52:38 spec.MySpec > classMethod FAILED 14:52:38 geb.error.UnableToLoadException: Unable to load configuration @ 'file:/var/lib/jenkins/workspace/<pipeline-name>/<project-name>/build/resources/test/GebConfig.groovy' (with environment: ) 14:52:38 at geb.ConfigurationLoader.loadRawConfig(ConfigurationLoader.groovy:293) 14:52:38 at geb.ConfigurationLoader.loadRawConfig(ConfigurationLoader.groovy:272) 14:52:38 at geb.ConfigurationLoader.getConf(ConfigurationLoader.groovy:127) 14:52:38 at geb.ConfigurationLoader.doGetConf(ConfigurationLoader.groovy:236) 14:52:38 at geb.ConfigurationLoader.getConf(ConfigurationLoader.groovy:88) 14:52:38 at geb.ConfigurationLoader.getConf(ConfigurationLoader.groovy:107) 14:52:38 at geb.spock.GebSpec.createConf(GebSpec.groovy:34) 14:52:38 at geb.spock.GebSpec.createBrowser(GebSpec.groovy:38) 14:52:38 at geb.spock.GebSpec.getBrowser(GebSpec.groovy:43) 14:52:38 at geb.spock.GebSpec.methodMissing(GebSpec.groovy:60) 14:52:38 at spec.MySpec.doSomething(MySpec.groovy:209) 14:52:38 at spec.MySpec.cleanupSpec(MySpec.groovy:202)
14:52:38 14:52:38 Caused by: 14:52:38 geb.error.UnableToLoadException: Unable to load configuration from class 'class script15549871574581670056198' (with environment: ) 14:52:38 at geb.ConfigurationLoader.loadRawConfig(ConfigurationLoader.groovy:305) 14:52:38 at geb.ConfigurationLoader.loadRawConfig(ConfigurationLoader.groovy:291) 14:52:38 ... 11 more
} catch (Throwable e) {
throw new UnableToLoadException(source, slurper.environment, e)
}
--
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/962a50a9-69d3-48f7-a7e1-06f8736e9b6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks for your email and the report of the issue you've encountered. The root exception, also referred to as cause is ignored in this case and not passed on in the constructor of UnableToLoadException: https://github.com/geb/geb/blob/a948be381fd2e25b5b170a421a555b8bd90128d0/module/geb-core/src/main/groovy/geb/error/UnableToLoadException.groovy#L24. If it was passed on to the super constructor then you'd see its message and stacktrace would be included in your original stacktrace. This is clearly a bug which I've recently accidentally introduced and not the intended behaviour so I've created an issue for it: https://github.com/geb/issues/issues/572.
On Fri, Apr 12, 2019 at 2:26 PM <thirsc...@gmail.com> wrote:
I found the problem.--
It was related to an exception that I throw myself in GebConfig.groovy, if some parameter are not provided, which might happen as a result of not doing a clean build.
I was confused because it did not print the message of that root exception, which would've helped greatly.
I only got to read it when I remote debugged the process, and inspect the throwable in this line:
ConfigurationLoader.groovy, line 304 - 306:} catch (Throwable e) {
throw new UnableToLoadException(source, slurper.environment, e)
}
Is there a generic way to make Java/Gradle/Whatever print the message of "e" also?
I tried exceptionFormat = 'full' in the Gradle Test task, but it didn't do anything for me.
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-...@googlegroups.com.
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/a5602e2d-92d6-4187-b466-daea8290ece5%40googlegroups.com.