I’ve been trying to play around with Groovy to see if it would be a good tool to add to the arsenal. I opened up the shell using groovysh and was going over the commands. When I got to show and purge I got back this error(entire contents of shell, formatted):
Groovy Shell (1.8.5, JVM: 1.6.0_23)
Type 'help' or '\h' for help.
groovy:000> show
ERROR java.lang.IncompatibleClassChangeError:
the number of constructors during runtime and compile time for java.lang.Exception do not match. Expected 5 but got 4
at java_lang_Runnable$run.call (Unknown Source)
groovy:000>
All I’ve found so far is that this might happen with Java 7 or when trying to integrate, but I’m using Java 6 and a fresh, empty Groovy shell.
Thanks.
This was reported in GROOVY-5163. The issue is fixed and will be in the 1.8.6 release (which is due to be released soon based on the groovy-dev mailing list discussions). A workaround in 1.8.5 is to use JDK 7 to run Groovy Shell.
Also, just want to point out that groovyConsole is another nice tool (Swing based graphical editor) for playing around with Groovy.