#63 java.util.zip.ZipException: invalid entry compressed size

closed-fixed
nobody
None
5
2007-09-26
2007-08-08
Toby Reyelts
No

Running Retroweaver on a jar file can cause the following stacktrace:

Exception in thread "main" net.sourceforge.retroweaver.RetroWeaverException: Wea
ving failed
at net.sourceforge.retroweaver.Weaver.main(Weaver.java:173)
Caused by: java.util.zip.ZipException: invalid entry compressed size (expected 6
92 but got 689 bytes)
at java.util.zip.ZipOutputStream.closeEntry(Unknown Source)
at java.util.zip.ZipOutputStream.putNextEntry(Unknown Source)
at java.util.jar.JarOutputStream.putNextEntry(Unknown Source)
at net.sourceforge.retroweaver.RetroWeaver.weaveJarFile(RetroWeaver.java
:216)
at net.sourceforge.retroweaver.Weaver.main(Weaver.java:170)

Discussion

  • Toby Reyelts
    Toby Reyelts
    2007-08-08

    Logged In: YES
    user_id=149785
    Originator: YES

    Apparently reusing a source ZipEntry in a call to ZipOutputStream.putNextEntry can cause this failure. We just need to create a new ZipEntry. Change Retroweaver.java:216 from

    out.putNextEntry(entry);

    to

    out.putNextEntry(new ZipEntry(name));

     
  • Logged In: YES
    user_id=1373398
    Originator: NO

    a new JarEntry is now created to avoid the problem.

    Xavier

     
    • status: open --> closed-fixed