converted Groovy exceptions to Java to avoid
IncompatibleClassChangeError when running on Java 7