简体   繁体   English

Grails 2.0.0.RC3:无法重新加载对控制器的更改,java.lang.NoSuchFieldException:__ timeStamp__239_neverHappen1323622798918

[英]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.

相关问题 Grails 2.0.0.RC3上的PayPal插件出错 - Error PayPal plugin on grails 2.0.0.RC3 Grails 2.0.0.RC1错误Spock测试 - Grails 2.0.0.RC1 error Spock testing Grails:插件[controllers:3.3.9]无法将更改重新加载到文件 - Grails : Plugin [controllers:3.3.9] could not reload changes to file Grails openid插件2.0.0 RC1:得到“没有这样的属性:用户异常” - Grails openid plugin 2.0.0 RC1: getting “No such property: User exception” Grails-java.lang.IllegalStateException:代理无法初始化 - Grails - java.lang.IllegalStateException: Proxy could not be initialized Grails控制器-无法捕获SocketException - Grails Controller - Could not catch a SocketException Grails 3不会自动重新加载我的应用程序中的更改 - Grails 3 does not auto reload changes in my app java.lang.IllegalStateException:找不到ApplicationContext,首先正确配置Grails - java.lang.IllegalStateException: Could not find ApplicationContext, configure Grails correctly first Grails 找不到匹配的构造函数:somiti.JointMember(java.lang.String) - Grails could not find matching constructor for: somiti.JointMember(java.lang.String) Grails3:AuthRoleController 中 java.lang.Boolean hasErrors() 的返回类型与 grails.artefact.Controller 中的 boolean 不兼容 - Grails3: The return type of java.lang.Boolean hasErrors() in AuthRoleController is incompatible with boolean in grails.artefact.Controller
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM