Home > error in > ant junit zipexception error in opening zip file

Ant Junit Zipexception Error In Opening Zip File

Contents

here for a quick overview of the site severe exception fixing docbase for context java util zip zipexception error in opening zip file Help Center Detailed answers to any questions you might

Caused By Java Util Zip Zipexception Error In Opening Zip File

have Meta Discuss the workings and policies of this site About Us Learn more

Java Util Zip Zipexception Error In Opening Zip File War

about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users

Java Util Zip Zipexception Error In Opening Zip File Tomcat

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 Configuring ant to run unit tests. Where should libraries be? How should ant build error in opening zip file classpath be configured? avoiding ZipException up vote 17 down vote favorite 4 I'm trying to run my junit tests using ant. The tests are kicked off using a JUnit 4 test suite. If I run this direct from Eclipse the tests complete without error. However if I run it from ant then many of the tests fail with this error repeated over and over until the junit task crashes. [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.(ZipFile.java:114) [junit] at java.util.zip.ZipFile.(ZipFile.java:131) [junit] at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1028) [junit] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:147) [junit] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.nextElement(AntClassLoader.java:130) [junit] at org.apache.tools.ant.util.CollectionUtils$CompoundEnumeration.nextElement(CollectionUtils.java:198) [junit] at sun.misc.CompoundEnumeration.nextElement(CompoundEnumeration.java:43) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.checkForkedPath(JUnitTask.java:1128) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeAsForked(JUnitTask.java:1013) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:834) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JUnitTask.java:1785) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:785) [junit] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) [junit] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [junit] at java.lang.reflect.Method.invoke(Method.java:597) [junit] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [junit] at org.apache.tools.ant.Task.perform(Task.java:348) [junit] a

here for a quick overview of the site Help Center Detailed answers to any questions you might java.util.zip.zipexception error in opening zip file junit ant have Meta Discuss the workings and policies of this site About error in opening zip file java Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting java.util.zip.zipexception error in opening zip file eclipse 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 http://stackoverflow.com/questions/461417/configuring-ant-to-run-unit-tests-where-should-libraries-be-how-should-classpa programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ZipException 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 http://stackoverflow.com/questions/6015092/zipexception-when-running-junit-tests 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 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 http://stackoverflow.com/questions/2601364/ant-build-classpath-jar-generates-error-in-opening-zip-file of the site Help Center Detailed answers to http://stackoverflow.com/questions/12745465/ant-junit-classnotfoundexception 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 error in 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 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)