[ https://issues.jenkins-ci.org/browse/JENKINS-6797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162195#comment-162195 ]
Dave Carey edited comment on JENKINS-6797 at 4/29/12 8:05 AM: -------------------------------------------------------------- Am I right in concluding that any Groovy Script or Command is off-limits as a pre-build step until this issue is resolved? Cheers Dave was (Author: davidcarey36): Am I right in concluding that ant Groovy Script or Command is off-limits as a pre-build step until this issue is resolved? Cheers Dave > Add @DataBoundConstructor > ------------------------- > > Key: JENKINS-6797 > URL: https://issues.jenkins-ci.org/browse/JENKINS-6797 > Project: Jenkins > Issue Type: Improvement > Components: groovy > Environment: All > Reporter: domi > Assignee: vjuranek > > DescriptorImpl.newInstance() is deprecated since a while and > @DataBoundConstructor should be used instead. > Builders not having a @DataBoundConstructor can't be used within Extensions > (e.g. BuildWrappers) a using @DataBoundConstructor itself. > Please add a @DataBoundConstructor to > - hudson.plugins.groovy.Groovy > and > - hudson.plugins.groovy.ScriptSource > Caused by: java.lang.IllegalArgumentException: Failed to instantiate class > hudson.plugins.groovy.Groovy from > {"groovyName":"(Default)","kind":"hudson.plugins.groovy.Groovy$DescriptorImpl","parameters":"","properties":"","scriptParameters":"","scriptSource":{"scriptFile":"dummy.groovy","value":"0"},"stapler-class":"hudson.plugins.groovy.Groovy"} > at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:352) > at > org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:552) > at > org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:587) > at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:344) > ... 40 more > Caused by: org.kohsuke.stapler.NoStaplerConstructorException: There's no > @DataBoundConstructor on any constructor of class hudson.plugins.groovy.Groovy > at > org.kohsuke.stapler.RequestImpl.loadConstructorParamNames(RequestImpl.java:461) > at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:331) > Caused by: java.lang.IllegalArgumentException: Failed to convert the > scriptSource parameter of the constructor public > hudson.plugins.groovy.SystemGroovy(hudson.plugins.groovy.ScriptSource,java.lang.String,java.lang.String) > at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:346) > ... 43 more > Caused by: java.lang.IllegalArgumentException: Failed to instantiate > interface hudson.plugins.groovy.ScriptSource from > {"command":"println(\"hello\")","value":"1"} > at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:352) > at > org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:552) > at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:344) > ... 43 more > Caused by: org.kohsuke.stapler.NoStaplerConstructorException: There's no > @DataBoundConstructor on any constructor of interface > hudson.plugins.groovy.ScriptSource > at > org.kohsuke.stapler.RequestImpl.loadConstructorParamNames(RequestImpl.java:461) > at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:331) > The same already had to be done for 'hudson.tasks.Shell' in the core - see > http://hudson.361315.n4.nabble.com/DataBoundConstructor-td2244199.html -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira