Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 2.0.0m1
-
Fix Version/s: 2.0.0m2
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Define a groovy project.
Create this java type MyHelper.java:
—
import groovy.lang.Closure;
public class MyHelper {
public void someMethod(int i,Closure c) {
for (int j=0;j<i;j++)
}
}
—
Define a script demoscript.groovy:
—
mh =new MyHelper()
mh.someMethod(4) {
println "$
"
}
—
In the script editor window, RunAs>JavaApplication - works
RunAs>GroovyScript:
Caught: groovy.lang.MissingMethodException: No signature of method: MyHelper.someMethod() is applicable for argument types: (java.lang.Integer, demoscript$_run_closure1) values: [4, demoscript$_run_closure1@16d835f]
Possible solutions: someMethod(int, groovy.lang.Closure)
at demoscript.run(demoscript.groovy:3)
it is as if the classpath for the script launch is not including the path to the compiled MyHelper, however, there must be slightly more to it because it doesn't complain it can't find MyHelper, it complains it can't find the method within MyHelper.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Andrew Eisenberg [ werdna ] |
| Original Estimate | 0 minutes [ 0 ] | |
| Remaining Estimate | 0 minutes [ 0 ] |
| Resolution | Fixed [ 1 ] | |
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Component/s | Run/Debug [ 13153 ] |
I've known there were some problems with run as groovy script, but I haven't had a chance to really look at it. I guess this is a good opportunity to.