Grails 2.0.4 Error opening zip file or JAR manifest missing Springloaded
Asked Answered
R

5

4

I've just downloaded Grails 2.0.4 and extracted it to /opt/grails/grails-2.0.4/ and made sure that the GRAILS_HOME environment variable is correct. But whenever I try run the "grails" command, I get the following error:

Error opening zip file or JAR manifest missing : /opt/grails/grails-2.0.4/lib/com.springsource.springloaded/springloaded-core/jars/springloaded-core-1.0.2.jar
Error occurred during initialization of VM
agent library failed to init: instrument

I don't understand what the problem could be. I've been using Grails-2.0.1 for months successfully in exactly the same way on exactly the same machine. I've tried re-downloading the grails-2.0.4.zip file in the hopes that it was a problem with the archive, but that didn't help. I also copied springloaded-core-1.0.2.jar from the grails-2.0.1/ directory, but that just caused another set of errors.

Any idea what could be going wrong?

Rufena answered 21/6, 2012 at 19:58 Comment(0)
W
7

It looks like your PATH has not been updated correctly. In other words, you are running the 2.0.1 grails script with GRAILS_HOME set to 2.0.4. You can tell because the version of spring loaded reported in the error message - 1.0.2 - is not the one required by Grails 2.0.4 (to help others diagnose this issue).

Wilder answered 22/6, 2012 at 4:41 Comment(1)
Thanks, I just restarted my bash session and the PATH problems disappeared. Thanks for help in understanding the problem.Rufena
A
8

I experienced this error too. The problem is spaces in the grails home path.

If it's this:

c:/grails 2.1.0/grails2.1.0

Then it will give an error, as there's a space between "grails" and "2.1.0". I just removed the spaces and it started working.

Agonized answered 15/7, 2013 at 5:58 Comment(0)
W
7

It looks like your PATH has not been updated correctly. In other words, you are running the 2.0.1 grails script with GRAILS_HOME set to 2.0.4. You can tell because the version of spring loaded reported in the error message - 1.0.2 - is not the one required by Grails 2.0.4 (to help others diagnose this issue).

Wilder answered 22/6, 2012 at 4:41 Comment(1)
Thanks, I just restarted my bash session and the PATH problems disappeared. Thanks for help in understanding the problem.Rufena
K
1

Have you cleared out the .grails folder in your home directory?

Grails caches a bunch of files in there, it could be that that is tripping you up.

I have had similar problems in the past when my internet connection wasn't a 100% reliable, it seems that the Grails downloader does not do thorough checking of downloaded files, so files in cache can become corrupt.

Kearse answered 22/6, 2012 at 4:37 Comment(0)
C
1

It's the folder hierarchy problem!

I have faced the same issue : when i set Grails_home make sure the path you are giving is e.g c:/grails2.1.0 and not c:/grails2.1.0/grails2.1.0

it often happens when you unzip the folder 2 folder with same name are created one inside another.

hope this will resolve!!!

Crete answered 13/2, 2013 at 12:24 Comment(0)
C
0

I had the same problem. Here is how I solved it:

Previously: I had grails in: C:\Program Files\grails-2.5.5 and in the system's environmental variables I had GRAILS_HOME: C:\Program Files\grails-2.5.5 and also C:\Program Files\grails-2.5.5\bin in PATH.

Then I tried: To put grails in C:\Grails_2.5.5\grails-2.5.5 and updated GRAILS_HOME to C:\Grails_2.5.5\grails-2.5.5 and the text in PATH to C:\Grails_2.5.5\grails-2.5.5\bin BUT, I still got the same error.

What fixed it:

  1. Put grails in C: C:\grails_2.5.5

  2. Update Environmental variables to the correct grails path: -GRAILS_HOME: C:\grails-2.5.5

    -In PATH: C:\grails-2.5.5\bin

  3. Restart pc

Wish you luck!

Caterinacatering answered 1/7, 2021 at 12:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.