我的facebook页面有“Grails Runtime exception”.我怎样才能去掉它,回到原来的页面呢?

My fakefacebook page has "Grails Runtime Exception" How can I get rid of it and get back my page that I had before?

本文关键字:回到原来 Grails facebook Runtime exception 我的      更新时间:2023-09-26

我正在做作业,突然…Grails运行时出现异常,整个页面空白。我所有的工作都白费了,我那么努力工作。我都快做完了。这是什么?我怎样才能恢复我的页面?

Error 500: Error processing GroovyPageView: Error executing tag <g:render>: Error executing tag <g:render>: No row with the given identifier exists: [myfakewall.Friend#155509] at /home/myfakewall2/myfakefb/grails-app/views/post/_partial.gsp:80 at /home/myfakewall2/myfakefb/grails-app/views/wall/edit.gsp:205
Servlet: grails
URI: /grails/wall/edit.dispatch
Exception Message: No row with the given identifier exists: [myfakewall.Friend#155509] 
Caused by: Error processing GroovyPageView: Error executing tag <g:render>: Error executing tag <g:render>: No row with the given identifier exists: [myfakewall.Friend#155509] at /home/myfakewall2/myfakefb/grails-app/views/post/_partial.gsp:80 at /home/myfakewall2/myfakefb/grails-app/views/wall/edit.gsp:205 
Class: /WEB-INF/grails-app/views/wall/edit.gsp 
At Line: [-1] 
Code Snippet:

我不知道这是什么意思,我希望我的页面重新设置,如果你们中的任何一个会这么好心地告诉我它是什么。如何摆脱它?

强烈建议您包含有问题的代码。但是从错误描述来看,似乎你在域类的数据库映射中有问题。

我猜,你已经做了这样的事情:

class A { 
    String    name
} 
class B {
    A property
    String name
}

在这种情况下,如果您删除了一条A记录,B就不能再检索到A,因此错误" no row with the given identifier exists"是有意义的。

这种情况的简单解决方案是在删除A对象之前删除使用对象A的所有记录B。或者你可以改变你的域名设置,使用belongsTo &

为了"恢复"你的工作,我认为截断&重新创建数据库就足够了。你也可以在数据源中使用"drop-create"。这没什么好恐慌的。