mateusmaso
mateusmaso

Reputation: 8453

Problem with grails [object is not an instance of declaring class]

I`m really desperate because everytime I restart my tomcat server to upload other war files from applications, one of my application always appear with this grails bug.

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 runs almost everything perfect, but there is always the same view with this problem.

I tried to do: cd webapps find mygrailsappli -exec touch {} ; from grails FAQ, but it doesnt work after restarting. But when I restart like 10 or 20 times it works again. I can't deal with it anymore, have to be a way to stop it and I need you guys help please.

Upvotes: 4

Views: 3223

Answers (1)

Peter N. Steinmetz
Peter N. Steinmetz

Reputation: 1252

It appears that this error is often due to a problem with constraints on the domain objects. More specifically, if there is a field constrained which doesn't exist in the class, this error message is produced (and is rather uninformative, IMHO).

Best to check that all fields mentioned in the constraints appear, with exactly the same spelling, in the object which the constraints are on.

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

Upvotes: 5

Related Questions