tags:

views:

22

answers:

1

I'm getting this error when running a groovy script (GroovyRuntimeException), and the top Google results are not clear/concise enough. What exactly does this error mean?

+1  A: 

Looking at the source, the script class does not have a main method and one of these is true:

  • It has neither a parameterless constructor not one that takes a String array
  • Or the constructor threw an exception

The stack trace should tell you which.

Michael Borgwardt
I think I didn't see a stack trace. I'll check it tomorrow, thanks for the pointer to the source.
ripper234
There was no stack trace. The cause was a "compilation error" in the constructor. Followup: http://stackoverflow.com/questions/3985716/is-there-a-use-strict-for-groovy
ripper234