VMWare initialization error during grails run-app - grails

When I type grails run-app to run grails application the cmd gives me this error
C:\Users\Mamun\Desktop\web\racetrack>grails run-app
Error opening zip file or JAR manifest missing : C:/Program
Error occurred during initialization of VM
agent library failed to init: instrument
C:\Users\Mamun\Desktop\web\racetrack>grails -version
Grails version: 2.0.4
But my grails working perfectly.Need help

Found this while doing a search of grails issues on GitHub. Maybe it can help you.

Related

Cannot run Grails application in Grails/Groovy Tool Suite 3.6

This is the error that I am getting when I try to start the application:
grails console
Loading Grails 2.4.4
|Configuring classpathDec 24, 2015 11:14:34 AM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
.
|Environment set to development
.................................
|Packaging Grails application
....................................
|Running Grails application
Error opening zip file or JAR manifest missing : C:\Program%20Files%20(x86)\grails3.6\ggts-bundle\grails-2.4.4\lib\org.springframework\springloaded\jars\springloaded-1.2.1.RELEASE.jar
Error occurred during initialization of VM agent library failed to init: instrument
Error |
Forked Grails VM exited with error
Error opening zip file or JAR manifest missing : C:\Program%20Files%20(x86)\grails3.6\ggts-bundle\grails-2.4.4\lib\org.springframework\springloaded\jars\springloaded-1.2.1.RELEASE.jar
This question is old but I struggled the same problem yesterday. The solution was to copy grails or your whole GGTS-Bundle to a location without any spaces in it's name. In addition you might need to update the springloaded.jar since there are a errors with a few JDK versions. See here and here for help.

"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 org.slf4j.spi.LocationAwareLogger.log not found

I'm using Grails 2.3.8
I've created a default app using
grails create-app testapp
When I run:
grails runApp
I get the following issue:
| Configuring classpath
| Error Error executing script RunApp: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
at org.eclipse.aether.internal.impl.Slf4jLoggerFactory$Slf4jLoggerEx.debug(Slf4jLoggerFactory.java:163)
at org.eclipse.aether.internal.impl.DefaultLocalRepositoryProvider.newLocalRepositoryManager(DefaultLocalRepositoryProvider.java:142)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.newLocalRepositoryManager(DefaultRepositorySystem.java:421)
at grails.util.BuildSettings.doResolve(BuildSettings.groovy:513)
at grails.util.BuildSettings.doResolve(BuildSettings.groovy)
at grails.util.BuildSettings$_getDefaultBuildDependencies_closure17.doCall(BuildSettings.groovy:774)
at grails.util.BuildSettings$_getDefaultBuildDependencies_closure17.doCall(BuildSettings.groovy)
at grails.util.BuildSettings.getDefaultBuildDependencies(BuildSettings.groovy:768)
at grails.util.BuildSettings.getBuildDependencies(BuildSettings.groovy:673)
| Error Error executing script RunApp: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
I tried running:
grails dependency-report
but I get the same issue.
java -version
gives:
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
Not sure if this is your problem, but I vaguely recall there being some problems with Groovy and the earlier versions of Java 7. I'd recommend moving to the most recent. I have no problems with 2.3.8 and jdk1.7.0_55 (most recent at time of writing).
Have you looked for conflicting versions of slf4j? Try running Grails dependency-report.
There are a few other SO questions that indicate this to be a cause of issue. Eg: java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log
sl4j error in weblogic when deploying grails application war
One thing that can help in debugging situations like this is doing:
export JAVA_OPTS="-verbose"
You can then see which slf4j JAR is being loaded by the JVM, but yes there is undoutably some conflicing slf4j JAR on your classpath
There was an instance of slf4j in:
/Library/Java/Extensions/
Moving that out seems to have fixed the problem.

Can't get Grails application to run on Windows 7

I'm having trouble running Grails on my PC (running Windows 7).
It's been a couple of years since I last worked with Grails, and I have a new computer. So I downloaded Grails and NetBeans and followed the instructions. (Grails: version 2.3.7, NetBeans: version 7.4.)
Everything seems to be working. Both the Java JDK and Grails work - I can run "grails" from the command prompt. And it was easy to activate the support for Grails in NetBeans.
I created a very simple "Hello world" application. It compiles fine - and I can run "grails war" to create a War file. But I can't get it to run on my PC. I get the same error using "Run" in NetBeans and when running "grails run-app" at the command prompt:
|Running Grails application
Error opening zip file or JAR manifest missing : C:\Program%20Files\Grails
\lib\org.springframework\springloaded\jars\springloaded-1.1.5.RELEASE.jar
Error occurred during initialization of VM
agent library failed to init: instrument
Error |
Forked Grails VM exited with error
And the program won't start. The jar in question isn't missing, so I can't see what's wrong. Any ideas? I'd be more than grateful for some help! :-)
/Anders from Sweden
Move your copy of grails to C:\ and try again.
There is a known problem with location with space symbol. You can see it in stacktrace:
C:\Program%20Files\...

Resources