Grails 3.0 错误,空指针 [英] Grails 3.0 error, nullpointer
本文介绍了Grails 3.0 错误,空指针的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只是试图通过grails"在命令行中运行 Grails 3.0.1,但由于以下堆栈跟踪而失败:
I was just trying to run Grails 3.0.1 in commandline via "grails" but it failed with the following stacktrace:
| Error Error occurred running Grails CLI: null
java.lang.NullPointerException
at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3137)
at org.grails.cli.profile.git.GitProfileRepository.getAllProfiles(GitProfileRepository.groovy:72)
at org.grails.cli.profile.commands.ListProfilesCommand.handle(ListProfilesCommand.groovy:43)
at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:173)
at org.grails.cli.GrailsCli.getBaseUsage(GrailsCli.groovy:118)
at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:162)
at org.grails.cli.GrailsCli.main(GrailsCli.groovy:99)
| Error Error occurred running Grails CLI: null
我正在使用这个版本的 Java
I'm using this version of Java
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
推荐答案
我已经尝试了不同线程中提到的所有内容,包括设置 GRAILS_OPTS.运行后问题似乎消失了grails create-app myApp
并创建一个示例应用程序.
I have tried all the things mentioned in different threads, including setting GRAILS_OPTS. The issue seems to go away after running
grails create-app myApp
and create a sample app.
不知道为什么,但似乎是 Grails 存储库的连接问题,在运行命令后解决了.
Not sure why, but seems like a connection problem with the Grails repo, which resolved after running the command.
这篇关于Grails 3.0 错误,空指针的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文