GRAILS-10336: convert exception classes to Java because of Groovy bug GROOVY-6080
- Fix to classes in 2.2.x