ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sullivan, Sean C - MWT" <Sullivan.S...@menlolog.com>
Subject EAR (zip) files created using Ant
Date Fri, 09 Apr 2004 16:58:26 GMT

I am using Ant's <ear> task to create an EAR file.

The EAR file contains a single WAR:  foo.war

foo.war contains a JAR file:   WEB-INF/lib/wsdl4j.jar


I wrote a Java program that will read the contents of the EAR file.
The program recursively scans the contents of all nested 
WAR files, ZIP files, and JAR files.

The program uses java.util.zip.ZipInputStream and java.util.zip.ZipEntry

While reading from the ZipInputStream, the program throws 
a ZipException:


Exception in thread "main" java.util.zip.ZipException: invalid entry
size (expected 736810 but got 736719 bytes)
at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:362)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:141)
at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:91)
at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:69)
at
zipdiff.DifferenceCalculator.processEmbeddedZipFile(DifferenceCalculator
.java:182)
at
zipdiff.DifferenceCalculator.processZipEntry(DifferenceCalculator.java:1
59)
at
zipdiff.DifferenceCalculator.buildZipEntryMap(DifferenceCalculator.java:
125)
at
zipdiff.DifferenceCalculator.calculateDifferences(DifferenceCalculator.j
ava:230)
at
zipdiff.DifferenceCalculator.getDifferences(DifferenceCalculator.java:30
9)
at zipdiff.DifferenceCalculator.main(DifferenceCalculator.java:332)


This is my question:  When Ant creates an EAR file, does it use
java.util.zip.ZipOutputStream or does it use 
org.apache.tools.zip.ZipOutputStream?

If the EAR (zip) file is created with
org.apache.tools.zip.ZipOutputStream, will I be able to read the file
using java.util.zip.ZipInputStream?

What is causing the "invalid entry size" error message?

Thanks in advance,

-Sean



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message