[英]Grails 2.0.0.RC3: Could not reload changes to controller, java.lang.NoSuchFieldException: __timeStamp__239_neverHappen1323622798918
This error has been popping up lately since I started evaluating Grails 2.0.0.RC3. 自从我开始评估Grails 2.0.0.RC3以来,最近出现了这个错误。 I make simple changes to a controller, then save. 我对控制器进行了简单的更改,然后保存。
From pictureList.count()
which somehow worked in 1.3.7 but not in 2.0.0RC3 从pictureList.count()
以某种方式在1.3.7中工作但在2.0.0RC3中不工作
def tagged = {
def pictureList = Picture.findAllByTag(params.id)
render(view: 'list', model: [pictureInstanceList:pictureList,
tag:params.id, pictureInstanceTotal:pictureList.count()])
}
To pictureList.size()
which makes more sense as pictureList is of type ArrayList to pictureList.size()
更有意义,因为pictureList是ArrayList类型
def tagged = {
def pictureList = Picture.findAllByTag(params.id)
render(view: 'list', model: [pictureInstanceList:pictureList,
tag:params.id, pictureInstanceTotal:pictureList.size()])
}
I get the compiling output message letting me know whats going on. 我收到编译输出消息让我知道发生了什么。
| Compiling 1 source files
| Compiling 1 source files.
| Compiling 1 source files..
| Compiling 1 source files...
Then I reload the page and I get this. 然后我重新加载页面,我得到了这个。
| Error 2011-12-11 17:00:01,908 [Thread-7] ERROR plugins.AbstractGrailsPluginManager
- Plugin [controllers:2.0.0.RC3] could not reload changes to file
[/Users/gotomanners/Documents/Projects/sampleProject/grails-app/controllers/sampleProject/PictureController.groovy]:
java.lang.NoSuchFieldException: __timeStamp__239_neverHappen1323622798918
Message: java.lang.NoSuchFieldException: __timeStamp__239_neverHappen1323622798918
Line | Method
->> 632 | doCall in SpringSecurityCoreGrailsPlugin$_closure5
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
^ 680 | run in java.lang.Thread
Caused by NoSuchFieldException: __timeStamp__239_neverHappen1323622798918
->> 1882 | getDeclaredField in java.lang.Class
Now the only way to recover from the error(that I've found out) is to restart the application. 现在,从错误中恢复的唯一方法(我发现)是重启应用程序。
Has anyone come across this issue?? 有人遇到过这个问题吗? I'll try to isolate the issue, if possible, so i can submit a bug report. 如果可能的话,我会尝试隔离问题,这样我就可以提交错误报告。
I should add that this app was originally based on grails 1.3.7 and I've recently upgraded it to 2.0.0RC1 and now to 2.0.0RC3 我应该补充说,这个应用程序最初基于grails 1.3.7,我最近将其升级到2.0.0RC1,现在升级到2.0.0RC3
Do you use Intellij Idea and run grails app with it? 你使用Intellij Idea并用它运行grails app吗? If so, you might try this temporary solution as offered on Idea's issue tracker : 如果是这样,您可以尝试使用Idea的问题跟踪器提供的临时解决方案:
add enable.groovy.hotswap=false to /bin/idea.properties and restart IDEA. 将enable.groovy.hotswap = false添加到/bin/idea.properties并重新启动IDEA。
This fixed this issue for me 这为我解决了这个问题
Press cntl + alt + G and run clean command in Intellij Idea.. it must work 按cntl + alt + G并在Intellij Idea中运行clean命令..它必须工作
Worked for me 为我工作
if that doesn't work, add add enable.groovy.hotswap=false to /bin/idea.properties then run clean 如果这不起作用,请将add.groovy.hotswap = false添加到/bin/idea.properties然后运行清理
Works too!! 工作太!!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.