generate-all No domain class found for.. error in grails

Short Story: Provide fully qualified domain class name(class name with the package) to the generate-all command

Long Story:

If you have recently moved from pre-1.3 to latest grails version(1.3.2 as of today) and suddenly you have started getting this error

No domain class found for name Book. Please try again and enter a valid domain class name

on generate-all command


grails generate-all Book

then don’t panic. As of grails-1.3.2, when you create a new domain class, it is generated in a package. For example, in my case my Book.groovy is generated under mylib package(mylib is the name of my application)

generate-all command requires you provide fully qualified class names. This is true for even older versions like 1.1.1.

Issue this command instead


grails generate-all mylib.Book

I wish they made this point clear in their documentation at http://grails.org/doc/latest/ref/Command%20Line/generate-all.html

One thought on “generate-all No domain class found for.. error in grails

Leave a Reply

Your email address will not be published. Required fields are marked *