| Execute system Groovy script not working with Hudson 3.0 [message #1014318] |
Mon, 25 February 2013 10:29  |
Lloyd Meinholz Messages: 2 Registered: February 2013 |
Junior Member |
|
|
Previous to hudson 3.0, I had been able to create build tasks using the Execute system Groovy script build step. The same scripts that were previously working are now failing. I am using the system Groovy script because I need access to the internal hudson objects, i.e. import hudson.model.*.
I read something about groovy being removed from hudson. Does that have anything to do with this and if so shouldn't the plugin add groovy? Or use the groovy that I have defined?
Here is the error message I am receiving. Thanks for any help or pointers.
FATAL: Failed to create Script instance for class: class Script1. Reason: java.lang.ClassCastException: Script1 cannot be cast to groovy.lang.GroovyObject
groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class Script1. Reason: java.lang.ClassCastException: Script1 cannot be cast to groovy.lang.GroovyObject
at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:430)
at groovy.lang.GroovyShell.parse(GroovyShell.java:743)
at groovy.lang.GroovyShell.parse(GroovyShell.java:723)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:680)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:666)
at hudson.plugins.groovy.SystemGroovy.perform(SystemGroovy.java:79)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:34)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:646)
at hudson.model.Build$RunnerImpl.build(Build.java:181)
at hudson.model.Build$RunnerImpl.doRun(Build.java:136)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:434)
at hudson.model.Run.run(Run.java:1390)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:40)
at hudson.model.ResourceController.execute(ResourceController.java:81)
at hudson.model.Executor.run(Executor.java:137)
Caused by: java.lang.ClassCastException: Script1 cannot be cast to groovy.lang.GroovyObject
at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:408)
... 14 more
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01795 seconds