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

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

问题描述

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

  snowch @ snowch-ws2:〜/ repos $ grails list-profiles --stacktrace 
|运行Grails CLI时发生错误错误:null(注意:堆栈跟踪已被过滤,使用--verbose查看整个跟踪。)
java.lang.NullPointerException $ b $ 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)
|运行Grails CLI时发生错误错误:null

我的版本为:

  snowch @ snowch-ws2:〜/ repos $ grails --version 
| Grails版本:3.0.1
| Groovy版本:2.4.3
| JVM版本:1.7.0_75

这是全新安装的grails和gvm。



命令 grails create-app myapp 没有错误。



这个问题类似于 Grails 3.0错误,nullpointer ,但是,该问题没有说明在线搜索后,我发现我需要在运行之前设置我的GRAILS_OPTS环境变量,如下所示:在运行之前,我需要设置GRAILS_OPTS环境变量命令:

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

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


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

My versions are:

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

This was on a fresh install of grails and gvm.

The command grails create-app myapp works without error.

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

解决方案

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"

Source of fix: https://grails.org/news/1292028

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

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