Menu

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

open
CORE (51)
5
2014-11-26
2008-05-15
weifeng niu
No

When I instrument attachd ldapjdk.jar(Because it is a little big, I zipped it with Winzip9), I got an exception like the following:

build.xml:366: com.vladium.emma.EMMARuntimeException: com.vladium.emma.EMMARuntimeException
at org.apache.tools.ant.Task.perform(Task.java:373)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: com.vladium.emma.EMMARuntimeException: com.vladium.emma.EMMARuntimeException
at com.vladium.emma.instr.InstrProcessorST.handleArchiveEnd(InstrProcessorST.java:362)
at com.vladium.util.IPathEnumerator$Factory$PathEnumerator.enumerate(IPathEnumerator.java:114)
at com.vladium.emma.instr.InstrProcessorST._run(InstrProcessorST.java:715)
at com.vladium.emma.Processor.run(Processor.java:54)
at com.vladium.emma.instr.instrTask.execute(instrTask.java:77)
at com.vladium.emma.emmaTask.execute(emmaTask.java:57)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
... 10 more
Caused by: java.util.zip.ZipException: invalid entry compressed size (expected 661 but got 660 bytes)
at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:194)
at com.vladium.emma.instr.InstrProcessorST.writeZipEntry(InstrProcessorST.java:838)
at com.vladium.emma.instr.InstrProcessorST$EntryWriteJob.run(InstrProcessorST.java:905)
at com.vladium.emma.instr.InstrProcessorST.drainJobQueue(InstrProcessorST.java:943)
at com.vladium.emma.instr.InstrProcessorST.handleArchiveEnd(InstrProcessorST.java:353)
... 17 more
--- Nested Exception ---
com.vladium.emma.EMMARuntimeException: com.vladium.emma.EMMARuntimeException
at com.vladium.emma.instr.InstrProcessorST.handleArchiveEnd(InstrProcessorST.java:362)
at com.vladium.util.IPathEnumerator$Factory$PathEnumerator.enumerate(IPathEnumerator.java:114)
at com.vladium.emma.instr.InstrProcessorST._run(InstrProcessorST.java:715)
at com.vladium.emma.Processor.run(Processor.java:54)
at com.vladium.emma.instr.instrTask.execute(instrTask.java:77)
at com.vladium.emma.emmaTask.execute(emmaTask.java:57)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: java.util.zip.ZipException: invalid entry compressed size (expected 661 but got 660 bytes)
at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:194)
at com.vladium.emma.instr.InstrProcessorST.writeZipEntry(InstrProcessorST.java:838)
at com.vladium.emma.instr.InstrProcessorST$EntryWriteJob.run(InstrProcessorST.java:905)
at com.vladium.emma.instr.InstrProcessorST.drainJobQueue(InstrProcessorST.java:943)
at com.vladium.emma.instr.InstrProcessorST.handleArchiveEnd(InstrProcessorST.java:353)
... 17 more
======================================

I use ant task to instrument the jar file, my target is like the following:

<target name="test.instr" description="Test instrument">
<path id="mytest.path.id">
<fileset dir="d:/temp">
<include name="ldapjdk.jar"/>
</fileset>
</path>
<emma verbosity="verbose">
<instr mode="overwrite" merge="true"
outfile="d:/temp/test.em" filter="com.*">
<instrpath>
<path refid="mytest.path.id" />
</instrpath>
</instr>
</emma>
</target>
==========================

Further more, when I tried to instrument another jar file named axis.jar. If I set filter="com.*" for <instr> task, I got the same exception as above. If I didn't set "filter" property, the jar file can be instrumented successfully.

Discussion

  • weifeng niu

    weifeng niu - 2008-05-15

    ldapjdk.jar which got an excepton when instrument

     
  • weifeng niu

    weifeng niu - 2008-05-15

    Logged In: YES
    user_id=2087804
    Originator: YES

    My JDK is JDK142_08 and Emma version is 2.0.5312

     
  • weifeng niu

    weifeng niu - 2008-05-15

    Logged In: YES
    user_id=2087804
    Originator: YES

    The axis.jar is too big (about 1.5M). If necessary, I may send it to you.
    We are trying to use Emma in our project, but got a lot of this issue (java.util.zip.ZipException: invalid entry compressed size) when instrument

     

Log in to post a comment.