The problem with grails [object is not an instance of a class declaration]

I am really desperate because every time I restart my tomcat server to load other military files from applications, one of my applications always appears with this grails error.

Message: object is not an instance of declaring class 
Caused by: Error processing GroovyPageView: object is not an instance of declaring class 
Class: gsp_myapp_home_gsp 

My application works almost everything perfectly, but the same view always exists with this problem.

I tried to do: cd webapps find mygrailsappli -exec touch {}; from the grail FAQ, but it does not work after a restart. But when I restart 10 or 20 times, it works again. I can no longer handle this, there must be a way to stop him, and I need you guys, please help.

+3
source share
1 answer

It seems that this error often occurs due to a problem with restrictions on domain objects. More specifically, if there is a restriction on a field that does not exist in the class, this error message is generated (and rather uninformatively, IMHO).

It is best to verify that all fields specified in the restrictions are displayed with exactly the same spelling in the object in which the restrictions are set.

A similar item is noted here: http://www.manning-sandbox.com/thread.jspa?threadID=47415

+4
source

Source: https://habr.com/ru/post/1778353/


All Articles