Grails 2.3.2 not working - grails

Good morning,
I created a new project with
Grails 2.3.2
Java JDK 1.7.0_45
When I run the command:
grails run-app
see the following errors:
**| Configuring classpath
nov 09, 2013 1:52:27 PM java.util.prefs.WindowsPreferences <init>
| Running Grails application
*** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message transform method call failed at ../../../src/share/instrument/JPLISAgent.c line: 844
Exception in thread "main"
| Error Forked Grails VM exited with error**
Can anyone help me?
thanks

Just tried with exact same setup, as you have.
Comment-out lines inside of grails.project.fork=[-----]
Delete .grails in user's home directory
grails clean
grails run-app
Its worked for newly created app but surely there are some problems in asm libraries.

Just comment-out section grails.project.fork of BuildConfig.groovy
That's it.
The error will run away.

For me help adding in BuildConfig.groovy
build "org.fusesource.jansi:jansi:1.11"
More information on http://jira.grails.org/browse/GRAILS-10756?focusedCommentId=78003&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel

Just remove grails.project.fork then clean-app and run-app.
That's all.

Following are the steps which work for me:-
Delete .grails in user's home directory
Right click on icon IntelliJ IDE and run as administrator
Hope your problem will be solved.

Related

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

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
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).
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.
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
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
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.

grails-2.4.3 not working?

I just downloaded grails 2.4.3 and created a test application, but it fails when trying to run the application.
Anybody knows why its going wrong here?
Thanks
C:\workspace\grails_apps\testApp>grails run-app
| Running Grails application
Error occurred during initialization of VM
agent library failed to init: instrument
Error opening zip file or JAR manifest missing : C:\Program%20Files%20(x86)\Grails\grails-2.4.3\lib\org.springframework\springloaded\jars\springloaded-1.2.0.RELEASE.jar
| Error Forked Grails VM exited with error
C:\workspace\grails_apps\testApp>
For anyone interested,
this problem was solved by moving the grails installation from
C:\Program Files (x86)\Grails\grails-2.4.3
to
C:\Grails\grails-2.4.3
eg. by removing the spaces in the GRAILS_HOME path as explained in the post found here.
Note, it did not work to remove the spaces by setting GROOVY_HOME = C:\PROGRA~2\Grails\grails-2.4.3

Grails VM exited with error

I am facing problem in executing a the test cases for grails application. I'm using grails 2.3.7 and jdk1.7.0_25. when I am trying to perform the test-app command to test my grails application, I am getting the bellow error.
|Loading Grails 2.3.7 |Configuring classpath . |Environment set to test ...................................... |Running without daemon... Error | Error running forked test-app: org/codehaus/gant/GantBinding (Use --stacktrace to see the full trace) Error | Forked Grails VM exited with error
any guess, why this type of error comes? Please check in this regard and suggest any help.
It looks like this may be an issue with a missing tools.jar file, according to this bug. Seems like it may have been fixed in a later version of Grails, so if you can't add the jar, perhaps upgrading may help.

STS - Failed to import grails project

I encountered several issue in importing grails project
After importing my grails project with GGTS 3.4.0 I can't do anything:
The import action action freezes at 50%, so I stop it.
'Update grails dependencies' action doesn't stop so I deselect the 'Keep external Grails running' option.
Clean and compile action triggered an an exception after a while:
"Problem executing: clean
The command 'C:\Program Files\Java\jdk1.7.0_45\bin\javaw.exe (23 déc. 2013 13:52:45)' was terminated because it didn't produce new output for some time.
See details for the output produced so far.
If you think the command simply needed more time, you can increase the time limit in the Grails preferences page.
See menu Windows >> Preferences >> Grails >> Launch"
It's really frustrating I could not do anything for several hours.
This topic follows this one: Install manually grails
Try with the lower version sts 3.3.0. I know this doesn't resolve the issue which you are facing but for sake of other workaround hope this helps.
http://dist.springsource.com/release/STS/3.3.0/dist/e3.8/groovy-grails-tool-suite-3.3.0.RELEASE-e3.8.2-win32-x86_64-installer.exe
Regards..

Grails hangs on command line

I just downloaded Grails 2.0.1.
Created a new project and then tried adding the mysql connector as per the documentation but Grails hangs at command prompt without any message. I tried to execute in verbose and stacktrace mode but it prints nothing.
I tried cleaning and re-executing but all the grails commands are getting stuck.
They don't print anything beyond "configuring classpath" message .
Please help.
Thanks
Cleaning .ivy cache helps
$HOME/.grails/ivy-cache
Had the same problem on grails 2.0.4.
The cause was one of the repos not responding and grails waits for it to timeout.
Setting log "verbose" in BuildConfig.groovy helped me find which repository caused the problem.
Try to add --offline to te command
$ grails clean --offline
worked for me, as I was stuck on configuring classpath due to unresolved dependencies.

Resources