java Grails 2.0.4 错误打开 zip 文件或 JAR 清单缺少 Springloaded
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11145814/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Grails 2.0.4 Error opening zip file or JAR manifest missing Springloaded
提问by sim
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:
我刚刚下载了 Grails 2.0.4 并将其解压缩到 /opt/grails/grails-2.0.4/ 并确保 GRAILS_HOME 环境变量是正确的。但是每当我尝试运行“grails”命令时,都会出现以下错误:
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.
我不明白可能是什么问题。我已经在完全相同的机器上以完全相同的方式成功使用 Grails-2.0.1 几个月了。我尝试重新下载 grails-2.0.4.zip 文件,希望它是存档的问题,但这没有帮助。我还从 grails-2.0.1/ 目录中复制了 springloaded-core-1.0.2.jar,但这只会导致另一组错误。
Any idea what could be going wrong?
知道可能出了什么问题吗?
回答by Vivek
I experienced this error too. The problem is spaces in the grails home path.
我也遇到过这个错误。问题是 grails 主路径中的空间。
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.
然后它会给出一个错误,因为“grails”和“2.1.0”之间有一个空格。我刚刚删除了空格并开始工作。
回答by Peter Ledbrook
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).
看起来您的 PATH 没有正确更新。换句话说,您正在运行 2.0.1 grails 脚本并将 GRAILS_HOME 设置为 2.0.4。您可以判断,因为错误消息中报告的 spring 加载版本 - 1.0.2 - 不是 Grails 2.0.4 所需的版本(帮助其他人诊断此问题)。
回答by Ewald
Have you cleared out the .grailsfolder in your home directory?
您是否清除了主目录中的.grails文件夹?
Grails caches a bunch of files in there, it could be that that is tripping you up.
Grails 在那里缓存了一堆文件,这可能会让您感到困惑。
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.
过去,当我的互联网连接不是 100% 可靠时,我遇到过类似的问题,Grails 下载器似乎没有对下载的文件进行彻底检查,因此缓存中的文件可能会损坏。
回答by Praveen Shendge
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
我遇到了同样的问题:当我设置 Grails_home 时,请确保您提供的路径是 egc:/grails2.1.0
而不是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.
当您解压缩文件夹 2 具有相同名称的文件夹时,经常会发生这种情况。
hope this will resolve!!!
希望这会解决!!!