【发布时间】:2012-01-17 23:03:00
【问题描述】:
自从我开始评估 Grails 2.0.0.RC3 以来,这个错误最近一直在出现。 我对控制器进行了简单的更改,然后保存。
来自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()])
}
到pictureList.size() 更有意义,因为pictureList 是ArrayList 类型
def tagged = {
def pictureList = Picture.findAllByTag(params.id)
render(view: 'list', model: [pictureInstanceList:pictureList,
tag:params.id, pictureInstanceTotal:pictureList.size()])
}
我收到编译输出消息,让我知道发生了什么。
| Compiling 1 source files
| Compiling 1 source files.
| Compiling 1 source files..
| Compiling 1 source files...
然后我重新加载页面并得到这个。
| 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
现在从错误中恢复的唯一方法(我发现)是重新启动应用程序。
有人遇到过这个问题吗??如果可能的话,我会尝试隔离问题,以便我可以提交错误报告。
我应该补充一点,这个应用程序最初是基于 grails 1.3.7 的,我最近将它升级到 2.0.0RC1,现在升级到 2.0.0RC3
【问题讨论】:
-
你试过在邮件列表中询问吗?
-
我在 2.0.0.RC3 中也遇到过这个问题。如果您可以始终如一地重现它,我建议您提交错误报告