You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Sullivan, Sean C - MWT" <Su...@menlolog.com> on 2004/04/09 18:58:26 UTC
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
Re: EAR (zip) files created using Ant
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Interestingly, I've seen this same error in our JRun console when
deploying EAR files. Since our applications still work fine despite
it, I have never had the impetus to look into it further.
Erik
On Apr 9, 2004, at 12:58 PM, Sullivan, Sean C - MWT wrote:
>
> 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(DifferenceCalculato
> r
> .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