groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CLOSE Dave <Dave.Cl...@us.thalesgroup.com>
Subject How to interpret an error message
Date Thu, 18 Jun 2015 23:54:02 GMT
I am certainly not a Groovy expert, not even a Java expert, but I use 
both occasionally and can usually decipher error messages. But this time 
I'm stumped.

Groovy is used as the job description language by the build-flow plugin 
for Jenkins (and in other parts of Jenkins as well). I have a Jenkins 
job on Jenkins 1.613 running on x86_64 Fedora 20 using the build flow 
plugin. A portion of it looks like the code below. (Perhaps you don't 
need to know about Jenkins or build-flow to help, but here it is just in 
case. I've already asked the Jenkins list without a useful response.)

branchName = build.buildVariableResolver.resolve("BRANCH")
def chkbranch ( String product, String branch ) {
    def cmd = ["/bin/bash", "-c", "/home/jenkins/bin/chkbranch"+"
"+product+" "+branch]  // Build the command string to run
    def ans = cmd.execute().text  // Run the command
    return "$ans"[0..-2]  // Chomp the answer before returning
}
parallel (
    { ignore ( FAILURE ) { build ( "job1", BRANCH: chkbranch ( "job1", 
branchName ) ) } },
    { ignore ( FAILURE ) { build ( "job2", BRANCH: chkbranch ( "job2", 
branchName ) ) } }
)

But this doesn't work. It throws a Groovy error which means nothing to 
me. The error looks something like the following. Any ideas?

ERROR: Failed to run DSL Script
groovy.lang.MissingMethodException: No signature of method:
Script1$_run_closure8.call() is applicable for argument types:
(Script1$_run_closure9, Script1$_run_closure10, Script1$_run_closure11,
Script1$_run_closure12, Script1$_run_closure13, Script1$_run_closure14,
Script1$_run_closure15) values: [Script1$_run_closure9@9202ce0,
Script1$_run_closure10@1f622ace, ...]
Possible solutions: doCall(), any(), any(), find(), grep(), dump()
	at 
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:903)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:723)
	at 
groovy.lang.GroovyObjectSupport.invokeMethod(GroovyObjectSupport.java:44)
	at 
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
	at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
	at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
	at Script1.run(Script1.groovy:30)
	at Script1$run.call(Unknown Source)
	at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
	at Script1$run.call(Unknown Source)
	at com.cloudbees.plugins.flow.FlowDSL.executeFlowScript(FlowDSL.groovy:84)
	at 
com.cloudbees.plugins.flow.FlowRun$FlyweightTaskRunnerImpl.run(FlowRun.java:219)
	at hudson.model.Run.execute(Run.java:1759)
	at com.cloudbees.plugins.flow.FlowRun.run(FlowRun.java:155)
	at hudson.model.ResourceController.execute(ResourceController.java:89)
	at hudson.model.Executor.run(Executor.java:240)
	at hudson.model.OneOffExecutor.run(OneOffExecutor.java:43)
-- 
Dave Close
"Technology has the shelf life of a banana." - Scott McNealy
Mime
View raw message