How can I fix Grails error: "No domain class found for name PrivacyOptions. Please try again and e
Posted
by ?????
on Stack Overflow
See other posts from Stack Overflow
or by ?????
Published on 2009-08-06T23:40:50Z
Indexed on
2010/05/24
21:41 UTC
Read the original article
Hit count: 188
I'm just getting started with Groovy/Grails.
I added a new domain controller to my project, and generate-controller doesn't like it.
There are other indications something's wrong: If I run the app no table is actually created in the database for this.
I've reduced the DomainController to one String field and no constraints, just to make sure there wasn't something wrong with my specification. I also tried renaming it, just in case there was something about the original name (Privacy) that conflicted with something.
I'm sure I have the correct name, and that the file is called PrivacyOptions.groovy and inside the class is also called PrivacyOptions.
Here's the error:
Running script /opt/local/grails/scripts/GenerateController.groovy
Environment set to development
Domain class not found in grails-app/domain, trying hibernate mapped classes...
No domain class found for name PrivacyOptions. Please try again and enter a valid domain class name
© Stack Overflow or respective owner