Failed to instantiate class org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder

146 views
Skip to first unread message

Bob Bick

unread,
Jul 10, 2013, 9:20:32 AM7/10/13
to jenkins...@googlegroups.com
When trying to save a build with a single step condition, get the following error:

Exception: java.lang.RuntimeException: Failed to instantiate class org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder from {"":["2","0","1"],"buildStep":{"classPath":"","groovyName":"(Default)","javaOpts":"","parameters":"","properties":"","scriptParameters":"","scriptSource":{"command":"println \"Hi\"","value":"0"},"stapler-class":"hudson.plugins.groovy.Groovy"},"condition":{"stapler-class":"org.jenkins_ci.plugins.run_condition.core.BooleanCondition","token":"${ENV,var=\"XXXX\"}"},"kind":"org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder","runner":{"stapler-class":"org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail"},"stapler-class":"org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder"}
Stacktrace:
javax.servlet.ServletException: java.lang.RuntimeException: Failed to instantiate class org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder from {"":["2","0","1"],"buildStep":{"classPath":"","groovyName":"(Default)","javaOpts":"","parameters":"","properties":"","scriptParameters":"","scriptSource":{"command":"println \"Hi\"","value":"0"},"stapler-class":"hudson.plugins.groovy.Groovy"},"condition":{"stapler-class":"org.jenkins_ci.plugins.run_condition.core.BooleanCondition","token":"${ENV,var=\"XXXX\"}"},"kind":"org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder","runner":{"stapler-class":"org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail"},"stapler-class":"org.jenkinsci.plugins.conditionalbuildstep.singlestep.SingleConditionalBuilder"}
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:616)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)

Has anyone else seen this error before? Any workarounds?

Thanks,

Bob




*** *** ***
This message contains information which may be confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail and delete the message.

Bob Bick

unread,
Aug 19, 2013, 2:37:10 PM8/19/13
to jenkins...@googlegroups.com
Just to follow up on this (in case other people encounter this issue)...

This issue is caused because the Groovy scripting plugin does not support conditional expressions.
--
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.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages