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 RE: EAR (zip) files created using Ant
Date Fri, 09 Apr 2004 23:19:50 GMT

Ant uses org.apache.tools.zip.ZipOutputStream to create 
EAR files, WAR files, and JAR files.

The source code is here:

http://cvs.apache.org/viewcvs.cgi/ant/src/main/org/apache/tools/zip/ZipO
utputStream.java

Since July 2003, the Ant team has fixed 3 bugs in the 
org.apache.tools.zip.ZipOutputStream class:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27549

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19195

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21899


The EAR that I am using was built with Ant 1.5.3

I will try building the EAR using Ant 1.6.1

-Sean


> -----Original Message-----
> From: Sullivan, Sean C - MWT
> Sent: Friday, April 09, 2004 9:58 AM
> To: user@ant.apache.org
> Subject: EAR (zip) files created using Ant
> 
> 
> 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


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


Mime
View raw message