grails - Grails运行应用程序必须执行两次

标签 grails

我必须运行两次启动应用程序。在第一次运行时,我的控制台报告一个错误:

| Running application...
Error occurred during initialization of VM
Could not reserve enough space for object heap

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':bootRun'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_77\bin\java.exe'' finished with
non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
| Error Failed to start server (Use --stacktrace to see the full trace)

但是在第二次运行中,它运行完美。谁能解释为什么?

最佳答案

运行JVM with -XX:MaxHeapSize=512m(或任何大数字)(或简称-Xmx512m)

关于grails - Grails运行应用程序必须执行两次,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36687274/

相关文章:

security - 如何锁定 grails spring security/cas 应用程序?

reactjs - 带有React的AWS CDN上的CORS问题

ajax - 使用 Grails Controller 代理 AJAX 请求

Grails 2.3.3 命名空间 Controller 渲染 View

grails - 使用Spring Security和Grails注销后如何将用户重定向到其他页面

hibernate - 在Grails中用hastoTo映射hasOne

grails - 更新时未保存Grails bool 值字段

hibernate - 无法以一对一关系更新拥有方的属性

grails - GRAILS GORM:渴望级联风格

grails - Grails WAR热部署导致"call '刷新'"错误