“Error occurred running Grails CLI: null” when running grails 3.0 command line

前端 未结 6 1162
半阙折子戏
半阙折子戏 2020-12-11 03:35

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

snowch@snowch-ws2:~/repos$ grails list-profiles --stacktrace
| Error E         


        
相关标签:
6条回答
  • 2020-12-11 03:47

    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

    0 讨论(0)
  • 2020-12-11 03:50

    It worked for me now. this was my setting

    GRAILS_HOME=C:\Users\murali.solayappan\apps\grails-3.1.11

    JAVA_HOME=C:\Program Files\Java\jdk1.8.0_102

    I received the same error while launching "grails" for the first time

    **Error occurred running Grails CLI: connect timed out**
    

    After reading GRAILS_HOME\bin\grails.bat i found that executing "grails" while in GRAILS_HOME dir makes some difference. So I did the same

    Now i received error stating that GRAILS couldn't find a particular maven package from my mirror repository - printed my private nexus repository url. I know that's my private repo and not connected to internet.

    so I changed the MY_HOME_DIR.m2\"settings.xml" with the one came by default in Maven.

    After that executed "grails" while in %GRAILS_HOME% dir.

    It worked like breeze !!! I got grails prompt.

    C:\Users\murali.solayappan\apps>grails

    | Enter a command name to run. Use TAB for completion:

    grails> exit

    0 讨论(0)
  • 2020-12-11 03:55

    I had same experience when I was working on "Building an Andoird Client" guide, I got the following message whenever I try to create an app in the same folder where I've created the first app grails-app : | Error Error occurred running Grails CLI: null (Use --stacktrace to see the ful l trace) So obviously, when you create a grails app in folder containing "grails-app" directory, grails will consider this folder as full grails application, hence cannot create-app in that directory. I used: Grails 3.1.15 Java 1.8.0.101 Hope this help.

    0 讨论(0)
  • 2020-12-11 03:57

    I have not figured out, what is the exact cause of the error, but it seems to occur if you try to run grails 3 in the system where grails 2 is also installed.

    What I did to get the command run - I created the project in a new directory. The directory for my old grails app was: /home/me/projects/oldgrailsapp

    when I tried to execute the grails command in /home/me/projects it failed, but when I tried this in another directory /home/me/projects_new, it succeeded. So I guess that the problem was that old grails configuration was somehow interfering with the new one.

    I also removed references to old grails and groovy versions from the PATH variable by editing .bashrc file in my home directory (I really do not know if it was needed).

    0 讨论(0)
  • 2020-12-11 04:03

    Somethimes it happens when you have wrong version of grails installed for the project you want to run it on try to run it somewhere else and see if you get the same error

    0 讨论(0)
  • 2020-12-11 04:04

    i had the same issue because i was using Grails 1.3.5 witj Java 8 which are incompatibles. I changed with Java 7 and it works fine.

    0 讨论(0)
提交回复
热议问题