[workflow-plugin] Java.lang.NoSuchMethodError: No such DSL method

5,521 views
Skip to first unread message

Bill Smith

unread,
Jan 12, 2015, 10:12:10 AM1/12/15
to jenkins...@googlegroups.com
I am working my way through the workflow plugin tutorial at https://github.com/jenkinsci/workflow-plugin/blob/master/TUTORIAL.md.   When I try to execute the script at https://github.com/jenkinsci/workflow-plugin/blob/master/TUTORIAL.md#checking-out-and-building-sources, I get the stack trace shown below.

This is Jenkins ver. 1.580.2, using a Jenkins Docker image that I pulled down about an hour ago.  

Any suggestions on how to fix this?

Bill Smith
Austin, TX


Started by user anonymous
Running: Allocate node : Start
Running on master in /var/jenkins_home/jobs/workflow example/workspace
Running: Allocate node : Body : Start
Running: Allocate node : Body : End
Running: Allocate node : End
Running: End of Workflow
java.lang.NoSuchMethodError: No such DSL method git found among [archive, bat, build, catchError, checkout, dir, echo, input, load, node, parallel, pwd, readFile, retry, sh, stage, step, svn, timeout, tool, unarchive, writeFile, ws]
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:107)
	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:98)
	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 com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:15)
	at WorkflowScript.run(WorkflowScript:2)
	at Unknown.Unknown(Unknown)
	at ___cps.transform___(Native Method)
	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:69)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:100)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:76)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
	at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55)
	at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
	at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
	at com.cloudbees.groovy.cps.Next.step(Next.java:58)
	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:145)
	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:267)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:70)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:176)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:174)
	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:111)
	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Finished: FAILURE

Slide

unread,
Jan 12, 2015, 10:19:45 AM1/12/15
to jenkins...@googlegroups.com
This is a shot in the dark since I have never used the workflow plugin, but do you have the git plugin and git client plugin installed?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/4c604a83-1ec8-4530-8321-1ab0dfb2a6fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bill Smith

unread,
Jan 12, 2015, 10:28:09 AM1/12/15
to jenkins...@googlegroups.com
Thank you for the suggestion.  According to the systemInfo page, these are enabled: git-client 1.15.0 and git-server 1.6.

Daniel Tschan

unread,
Jan 15, 2015, 1:55:57 PM1/15/15
to jenkins...@googlegroups.com, william...@gmail.com
You also need the Git Plugin and a Git CLI client to be able to use Git as build SCM: https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin

Jesse Glick

unread,
Jan 15, 2015, 3:25:13 PM1/15/15
to jenkins...@googlegroups.com, william...@gmail.com
On Thursday, January 15, 2015 at 1:55:57 PM UTC-5, Daniel Tschan wrote:
You also need the Git Plugin

Reply all
Reply to author
Forward
0 new messages