2016-03-08 40 views
0

使用run-app時出現錯誤。這裏是我的路徑Forked Grails虛擬機退出,出現錯誤grails 2.5.3

➜ $ 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 
+0

如果使用'--stacktrace'運行,您會得到有關鑼錯誤的信息嗎? –

+0

不幸的是,沒有。它不會產生任何堆棧跟蹤。輸出與上述相同。 – Anthony

回答

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]

相關問題