“运行 Grails CLI 时发生错误:null"运行 grails 3.0 命令行时 [英] "Error occurred running Grails CLI: null" when running grails 3.0 command line

查看:28
本文介绍了“运行 Grails CLI 时发生错误:null"运行 grails 3.0 命令行时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行 grails list-profiles,但收到以下错误:

I'm trying to run grails list-profiles, but receive the following error:

snowch@snowch-ws2:~/repos$ grails list-profiles --stacktrace
| Error Error occurred running Grails CLI: null (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.lang.NullPointerException
    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.main(GrailsCli.groovy:99)
| Error Error occurred running Grails CLI: null

我的版本是:

snowch@snowch-ws2:~/repos$ grails --version
| Grails Version: 3.0.1
| Groovy Version: 2.4.3
| JVM Version: 1.7.0_75

这是全新安装的 grails 和 gvm.

This was on a fresh install of grails and gvm.

命令 grails create-app myapp 可以正常工作.

The command grails create-app myapp works without error.

这个问题类似于Grails 3.0 错误,空指针,但是,那个问题没有说明正在运行什么命令.

This question is similar to Grails 3.0 error, nullpointer, however, that question does not state what command is being run.

推荐答案

上网搜索后发现我的 GRAILS_OPTS 环境变量在运行命令之前需要设置如下:

After searching online, I found that I needed to set my GRAILS_OPTS environment variable as follows before running the command:

export GRAILS_OPTS="-XX:-UseSplitVerifier -Xverify:none"

修复来源:https://grails.org/news/1292028

这篇关于“运行 Grails CLI 时发生错误:null"运行 grails 3.0 命令行时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆