Problem with Run as Groovy Script

Details

Description

From the mailing list:

I have eclipse 3.5.1 with the groovy plugin snapshot from 10/28.
I have a small groovy script that I'm trying to run with the eclipse debugger (by clicking Debug As -> Groovy Script on the context menu in the script window).
However, when I dothis, the debugger halts in the guts of the class loader, and when I resume it produces this exception:
Exception in thread "main" java.lang.NoClassDefFoundError: 3/5/1/plugins/org/codehaus/groovy_1/7/0/xx-20091028-2000-e35/conf/groovy-starter/conf
Caused by: java.lang.ClassNotFoundException: 3.5.1.plugins.org.codehaus.groovy_1.7.0.xx-20091028-2000-e35.conf.groovy-starter.conf
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)

I believe this has something to do with how arguments are computed for the script launcher.

Activity

I reported this issue, and I failed to mention that I am running on MacOS. It turns out that the default VM args specified in the debug configuration pane were not quoted, and I have a space in my eclipse path. So I simply put double quotes around the args and I got past this exception. Here is what I have now:

Eric Tiffany
added a comment - 29/Oct/09 4:58 PM I reported this issue, and I failed to mention that I am running on MacOS. It turns out that the default VM args specified in the debug configuration pane were not quoted, and I have a space in my eclipse path. So I simply put double quotes around the args and I got past this exception. Here is what I have now:
-Dgroovy.starter.conf="/Applications/eclipse 3.5.1/plugins/org.codehaus.groovy_1.7.0.xx-20091028-2000-e35/conf/groovy-starter.conf" -Dgroovy.home="/Applications/eclipse 3.5.1/plugins/org.codehaus.groovy_1.7.0.xx-20091028-2000-e35"

Andrew Eisenberg
added a comment - 29/Oct/09 5:10 PM I had a feeling it was something with unquoted spaces. Thanks for posting the fix, saves me from tracking down exactly where this might have occurred.

Andrew Eisenberg
added a comment - 29/Oct/09 6:23 PM Fix for this has been committed and will be available in the next dev build. After the snapshot is available, please verify that this is working for you now.