Grails : No domain class found for name domain-class-name . Please try again and enter a valid domain class name

Sometimes, even if you create domain objects in grails you get the error that No domain class found.
I am not sure why this happens because I am new to Grails and still learning. But the following steps work for me

i) Stop all the running grails app ctrl+C
ii) grails clean
iii) Now try grails generate-all domain-class-name

This generally works for me. I will update this post if I find the root cause of the problemSom

2 thoughts on “Grails : No domain class found for name domain-class-name . Please try again and enter a valid domain class name

    1. Paras

      I also did not understande fully the reason for that. Anyway, stopping app and running grails clean doesn’t hurt. 🙂

      Reply

Leave a Reply

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