Forked Grails VM退出,错误grails为2.5.3

时间:2016-03-08 16:13:40

标签: grails

使用run-app时出错。这是我的路径

➜ $ echo $GROOVY_HOME
/Users/anthony/.sdkman/candidates/groovy/current
➜ $ groovy --version
Groovy Version: 2.4.5 JVM: 1.8.0_25 Vendor: Oracle Corporation OS: Mac OS X
➜ $ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
➜ $ java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
➜ $ echo $GRAILS_HOME
/Users/anthony/.sdkman/candidates/grails/current
➜ $ grails --version
Grails version: 2.5.3

当我使用run-app时出现错误

➜ $ grails --version
Grails version: 2.5.3
| Running Grails application
objc[27433]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Configuring Spring Security UI ...
... finished configuring Spring Security UI
| Error Forked Grails VM exited with error
| Server running. Browse to http://localhost:8080/myapp

1 个答案:

答案 0 :(得分:0)

我在Grails 2.5.3中得到了这个:

Disconnected from the target VM, address: '127.0.0.1:19767', transport: 'socket'
Error |
Forked Grails VM exited with error

Process finished with exit code 1

当我评论出约束时,试图保存一本没有作者的书

class Book {
  static belongsTo = [authors: Author]

  static constraints = {
    // authors nullable: true
  }
}

我的解决方案是删除static belongsTo = [authors: Author]