当我尝试为某个域类搭建新的控制器和视图时,Grails一直告诉我在grails-app/ views /domainName/{create.gsp,edit.gsp,list.gsp,show.gsp}中存在文件。但是,我已经多次从视图位置删除了整个domainName目录。Grails指的是什么?这与缓存有什么关系吗?
即使我忽略了这个异常,并告诉grails覆盖这些文件,即使它们不存在,当我启动应用程序时,导航到控制器并单击create new domainItem -浏览器思考一分钟,Grails会抛出以下异常:
Error executing script RunApp: GC overhead limit exceeded 2011-11-02 10:22:50,484 [ContainerBackgroundProcessor[StandardEngine[Tomcat]]] ERROR core.ContainerBase - Sanitizing stacktrace: - Exception invoking periodic operation: java.lang.OutOfMemoryError: GC overhead limit exceeded at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:116) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590) at java.lang.Thread.run(Thread.java:722)
该应用程序与任何其他域类都工作得很好。
我尝试过的事情: 1.删除有问题的域以及控制器和视图,删除单元测试,删除生成的类文件。基本上消除domain类任何已知跟踪2.运行'clean‘3.创建一个同名的新域4.再次搭建它的视图和控制器(此时grails问我是否要覆盖视图?!) 5.重新启动STS 6.重新启动计算机
发布于 2011-11-03 12:45:35
所以问题出在下面这一行:
time(range:0L..86400000L) //24h in milliseconds我还是不明白为什么。变量time的类型为long,以下两种变化也会导致内存溢出:
time(range:0..86400000L)
time(range:0..86400000)https://stackoverflow.com/questions/7984858
复制相似问题