Ant Compile Error In Opening Zip File
Contents |
here for a quick overview error in opening zip file java of the site Help Center Detailed answers to javac error in opening zip file any questions you might have Meta Discuss the workings and policies of this
Error In Opening Zip File Jenkins
site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us
Error In Opening Zip File Gradle
Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Ant build error in opening zip file maven classpath jar generates “error in opening zip file” up vote 5 down vote favorite 1 I have a project built in eclipse with a dependencies on 3rd party jars. I'm trying to generate a suitable build file for ant - using eclipses built-in export->ant buildfile feature as a starting block. When I run the build target I get the following error: [javac] error: error reading /base/repo/FabTrace/lib/apache/geronimo/specs/geronimo-j2ee-management_1.0_spec/1.0/geronimo-j2ee-management_1.0_spec-1.0.jar; error in opening zip file And the whole build file (auto-generated by eclipse) looks like this: (NB: the error above always references the first jar listed in the classpath) Meta Discuss the workings and policies of this site About Us java.util.zip.zipexception error in opening zip file linux Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with error in opening zip file weblogic us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just http://stackoverflow.com/questions/2601364/ant-build-classpath-jar-generates-error-in-opening-zip-file like you, helping each other. Join them; it only takes a minute: Sign up Maven : error in opening zip file when running maven up vote 33 down vote favorite 7 [ERROR] error: error reading C:\Users\suresh\.m2\repository\org\jdom\jdom\1.1\jdom-1.1.jar; error in opening zip file [ERROR] error: error reading C:\Users\suresh\.m2\repository\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar; error in opening zip file [ERROR] error: error reading C:\Users\suresh\.m2\repository\org\apache\cxf\cxf-rt-bindings-http\2.2.1\cxf-rt-bindings-http-2.2.1.jar; http://stackoverflow.com/questions/7600028/maven-error-in-opening-zip-file-when-running-maven error in opening zip file [ERROR] error: error reading C:\Users\suresh\.m2\repository\org\codehaus\jra\jra\1.0-alpha-4\jra-1.0-alpha-4.jar; error in opening zip file [ERROR] error: error reading C:\Users\suresh\.m2\repository\org\apache\cxf\cxf-api\2.2.1\cxf-api-2.2.1.jar; error in opening zip file [ERROR] error: error reading C:\Users\suresh\.m2\repository\org\apache\cxf\cxf-common-utilities\2.2.1\cxf-common-utilities-2.2.1.jar; error in opening zip file [INFO] 44 errors How to resolve this error while running mvn clean install? And I see that, on to the repository path in my disk, starting from servlet, no packages are being created inside repository. maven share|improve this question edited May 3 at 11:30 R O M A N I A 12k116575 asked Sep 29 '11 at 15:53 UnKnown 5,67141147242 try: mvn -U clean install. The -U parameter forces maven to update. –PaoloVictor Sep 29 '11 at 15:55 add a comment| 8 Answers 8 active oldest votes up vote 49 down vote Probably, contents of the JAR files in your local .m2 repository are HTML saying "301 Moved Permanently". It seems that mvn does not handle "301 Moved Permanently" properly as expected. In such a case, download the JA up a new machine, I am unable to compile, with error accessing a dependency file. [ant:javac] error: error reading /Users/rayj/.gradle/caches/artifacts-4/com.google.guava/guava/c12498cf18507aa6433a94eb7d3e77d5/jars/guava-11.0.2.jar; cannot read zip file I was able to reproduce on another machine by removing my gradle cache ("~/.gradle/caches/artifacts-4/"). I was able to determine that the "corrupted" jar file(s) had a behavior different than "non-corrupted" jar files. For "non-corrupted" jar files, I can rename to ".zip" and extract the zip to see the contents of the file (as expected). For "corrupted" jar files, if I rename to ".zip" and extract the zip, the output is another jar file (unexpected). If I rename/extract again, then it properly extracts as the contents of the file (expected). I can manually workaround this issue by: for each corrupt jar file - rename to .zip and extract to create a new jar (this turns a corrupt jar into a non-corrupt jar) This suggests that the problem is solely related to a jar file being "corrupt". Although this works, it is a painful resolution to an automated build =) I am looking for some guidance as to what may have caused this and how to troubleshoot the root issue. daz 2012-07-04 18:25:00 UTC #2 The corrupted jar must be coming from somewhere: have you checked the repository that 'guava-11.0.2.jar' is downloaded from? Best bet could be to fix this problem at the source. jasonray (jasonray) 2012-07-05 15:07:00 UTC #3 I was able to confirm that the guava jar as downloaded from its source was indeed valid (non-corrupted). Good new ending to story, I realized that I was on an older version of gradle (1.6 milestone) - and this problem was resolved by upgrading to the release version (1.0). Home Categories FAQ/Guidelines Terms of Service Privacy Policy Powered by Discourse, best viewed with JavaScript enabled