grails 的问题 [对象不是声明类的实例]
我真的很绝望,因为每次我重新启动 Tomcat 服务器以从应用程序上传其他 War 文件时,我的应用程序之一总是出现此 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
我的应用程序运行几乎一切完美,但对于这个问题总是有相同的观点。
我尝试执行以下操作: cd webapps find mygrailsappli -exec touch {} ; 来自 grails FAQ,但重新启动后不起作用。但当我重新启动 10 或 20 次时,它又可以工作了。 我无法再处理它了,必须想办法阻止它,我需要你们的帮助。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来此错误通常是由于域对象的约束问题造成的。更具体地说,如果类中不存在一个受约束的字段,则会生成此错误消息(恕我直言,这是相当无信息的)。
最好检查约束中提到的所有字段是否以完全相同的拼写出现在约束所在的对象中。
这里有一个类似的项目: http://www.manning-sandbox.com /thread.jspa?threadID=47415
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