setScriptBaseClass not working inside eclipse

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

setScriptBaseClass not working inside eclipse

Felix Dorner
but got no good answers.

Here's the text:

I am trying to run (Run as JUnit Test) the example ScriptBaseTest listed http://groovy.codehaus.org/Embedding+Groovy
inside Eclipse 4.2, groovy compiler set to latest. The test fails with this stacktrace:

groovy.lang.MissingMethodException: No signature of method: Script1.foo() is applicable for argument types: () values: []
Possible solutions: run(), run(), find(), any(), use([Ljava.lang.Object;), find(groovy.lang.Closure)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:78)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:137)
    at Script1.run(Script1.groovy:1)

I tried to use fully qualified package names in the argument to setScriptBaseClass but this doesn't work either.

Strangely, when I run it from commandline (without recompiling) it works.


I started debugging this and have seen that in ModuleNode.setScriptBaseClassFromConfig() where the super class is set on the node, the nodes compile unit is (still) null, so the method body is just skipped. From here on I'm clueless.

Anyone tried this? Is this working for you?

Thanks,
Felix
--
Linux. The choice of a GNU generation.
Reply | Threaded
Open this post in threaded view
|

Re: setScriptBaseClass not working inside eclipse

Andrew Eisenberg-2
That's odd. I'll have to take a look.

On Saturday, February 2, 2013, Felix Dorner wrote:
but got no good answers.

Here's the text:

I am trying to run (Run as JUnit Test) the example ScriptBaseTest listed http://groovy.codehaus.org/Embedding+Groovy
inside Eclipse 4.2, groovy compiler set to latest. The test fails with this stacktrace:

groovy.lang.MissingMethodException: No signature of method: Script1.foo() is applicable for argument types: () values: []
Possible solutions: run(), run(), find(), any(), use([Ljava.lang.Object;), find(groovy.lang.Closure)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:78)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:137)
    at Script1.run(Script1.groovy:1)

I tried to use fully qualified package names in the argument to setScriptBaseClass but this doesn't work either.

Strangely, when I run it from commandline (without recompiling) it works.


I started debugging this and have seen that in ModuleNode.setScriptBaseClassFromConfig() where the super class is set on the node, the nodes compile unit is (still) null, so the method body is just skipped. From here on I'm clueless.

Anyone tried this? Is this working for you?

Thanks,
Felix
--
Linux. The choice of a GNU generation.