Hi all
during my work on the compiler I had a rethinking about
http://jira.codehaus.org/browse/GRAILS-4I stumbled over the same NoClassDefFoundException in combination with
static mehods, but now I can explain it. a static method call is done
with these arguments: String name, String method, Object[] arguments.
name is the name of the class used to make the call on. As we need a
class to actually do the call the Invoker asks the classloader to load
the class for that name. That alone might be ok, but the classloader
used for this is the classloader used to load the Invoker class!
normally this isn't the same ClassLoader that is used to create the
script. This *has to* fail in most cases. A compiler side colution is
not to use the static method call, but to use the normal method call and
let it call on class. That is working in current groovy. And my next
commit for groovy will ensure that for now.
so sorry for the big time it took, but look forward to patch very soon.
I hope I can make it till sunday. The patch is in the endphase, but due
to the fundamental structure changes I made I have many corner cases to
debug. Also you can look forward into a file that does resolve all types
used in a script and that does compile scripts of these types if needed.
I am also (nearly) sure no compilation errors are swallowed any more.
end of status report
bye blackdrag