grailsgrails-2.0grails-3.1

grails error: grails.validation.Validateable is not an annotation in @grails.validation.Validateable


Working through upgrading from grails 2.2.5 to 3.1 and we have an interesting error. How do we resolve this?

class grails.validation.Validateable is not an annotation in @grails.validation.Validateable
 @ line 17, column 1.
   @Validateable
   ^

Solution

  • The answer is that in Grails 2.x the 'Validateable' was applied using an annotation

    @Validateable
    class ApiCatalogCommand {}
    

    In grails 3.x, it is now an interface:

    class ApiCatalogCommand implements Validateable {}