Java.util.zip.zipexception Error In Opening Zip File Junit Ant
here ant build error in opening zip file for a quick overview of the site Help ant javac error in opening zip file Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with 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 like you, helping each other. Join them; it only takes a minute: Sign up java.uti.zip.ZipException error while calling a ant target up vote 2 down vote favorite 1 While calling a ANT target, I am getting the below error. I tried my level best solve the issue but not. Unable to obtain resource from C:\uiunit\log4j.properties: java.util.zip.ZipException: error in opening zip file [junit] Unable to obtain resource from C:\uiunit\log4j.properties: [junit] java.util.zip.ZipException: error in opening zip file [junit] at java.util.zip.ZipFile.open(Native Method) [junit] at java.util.zip.ZipFile.
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with 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 like you, helping each other. Join them; it only takes a minute: Sign up ZipException http://stackoverflow.com/questions/17248991/java-uti-zip-zipexception-error-while-calling-a-ant-target when running junit tests up vote 8 down vote favorite 1 I've been trying in vain to get ant to execute some tests written in junit. Any advice would be much appreciated. I'm pretty new to both ant and Java so please be patient. As a quick summary, what i'm doing is trying to get ant to execute a very simple test, the classpath http://stackoverflow.com/questions/6015092/zipexception-when-running-junit-tests looks ok considering the output from ant -debug. I'm getting a null test error for a test who's class file is explicitly mentioned in the classpath. Also, i'm getting a ZipException, i dont know what that's about. Here's a testcase i'm trying to run: package testmanagment; import junit.framework.*; public abstract class EasyTest extends TestCase { public EasyTest(String name) { super(name); } protected void setUp() {} protected void testSeeMee() throws Exception { assertTrue(true); } protected void testSeeMeetoo() throws Exception { assertTrue(true); } } There are a few tests in the package, this one was just to see why everything was failing. it fails with ZipException. and here's a little bit of my make file:
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this http://stackoverflow.com/questions/325202/java-util-zip-zipexception-error-in-opening-zip-file site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with 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 like you, helping each other. Join them; it only takes a minute: Sign up java.util.zip.ZipException: error in error in opening zip file up vote 36 down vote favorite 6 I have a Jar file, which contains other nested Jars. When I invoke the new JarFile() constructor on this file, I get an exception which says: java.util.zip.ZipException: error in opening zip file When I manually unzip the contents of this Jar file and zip it up again, it works fine. Also, please error in opening note that this exception is seen only on WebSphere 6.1.0.7 and higher versions. The same thing works fine on tomcat and WebLogic. Also, when I use JarInputStream instead of JarFile, I am able to read the contents of the Jar file without any exceptions. Please let me know if you have any ideas on how this can be fixed. Thanks, Sandhya java share|improve this question edited Aug 23 at 21:02 Petro 1,2591623 asked Nov 28 '08 at 7:12 user41536 234156 2 Thanks for the hint about rezipping the file -- that fixed for me. –Bryan Larsen May 4 '10 at 22:24 I've had this problem on Mac when Windows and Linux worked just fine. Using JarInputStream fixed the problem for me. –Boris van Schooten Dec 20 '11 at 9:47 I have faced the same problem on Tomcat Start UP [catalina.properties]: org.apache.catalina.startup.TldConfig tldScanJar WARNING: Failed to process JAR [jar:../opensaml.jar!/] for TLD files ZipException to resolve this problem add opensaml.~.jar into Application lib folder. –Yash Apr 11 at 12:19 add a comment| 8 Answers 8 active oldest votes up vote 11 down vote Make sure yo