Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4977607
Votes 4
Synopsis Compilation error java.lang.InternalError: jzentry == 0
Category java:compiler
Reported Against 1.4.2
Release Fixed mustang(b91)
State 10-Fix Delivered, bug
Priority: 2-High
Related Bugs 6250581 , 6295519 , 6320082 , 4615343 , 6236704
Submit Date 13-JAN-2004
Description


FULL PRODUCT VERSION :
java version "1.4.2_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03)
Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
 customer  Windows XP [version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
Information: 1 error
Information: 0 warnings
Information: An exception has occurred in the compiler (1.4.2_02). Please file a bug at the Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.
Information: java.lang.InternalError: jzentry == 0,
Information:  jzfile = 9973032,
Information:  total = 69,
Information:  name = D:\java\j2ee\jdk\jre\lib\jce.jar,
Information:  i = 2,
Information:  message = invalid LOC header (bad signature)
Information: 	at java.util.zip.ZipFile$2.nextElement(ZipFile.java:321)
Information: 	at com.sun.tools.javac.v8.code.ClassReader.openArchive(ClassReader.java:975)
Information: 	at com.sun.tools.javac.v8.code.ClassReader.list(ClassReader.java:1218)
Information: 	at com.sun.tools.javac.v8.code.ClassReader.listAll(ClassReader.java:1339)
Information: 	at com.sun.tools.javac.v8.code.ClassReader.fillIn(ClassReader.java:1357)
Information: 	at com.sun.tools.javac.v8.code.ClassReader.complete(ClassReader.java:1052)
Information: 	at com.sun.tools.javac.v8.code.Symbol.complete(Symbol.java:372)
Information: 	at com.sun.tools.javac.v8.comp.Enter.visitTopLevel(Enter.java:467)
Information: 	at com.sun.tools.javac.v8.tree.Tree$TopLevel.accept(Tree.java:390)
Information: 	at com.sun.tools.javac.v8.comp.Enter.classEnter(Enter.java:442)
Information: 	at com.sun.tools.javac.v8.comp.Enter.classEnter(Enter.java:456)
Information: 	at com.sun.tools.javac.v8.comp.Enter.complete(Enter.java:596)
Information: 	at com.sun.tools.javac.v8.comp.Enter.main(Enter.java:582)
Information: 	at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:331)
Information: 	at com.sun.tools.javac.v8.Main.compile(Main.java:569)
Information: 	at com.sun.tools.javac.Main.compile(Main.java:36)
Information: 	at com.sun.tools.javac.Main.main(Main.java:27)
Information: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Information: 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
Information: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Information: 	at java.lang.reflect.Method.invoke(Method.java:324)
Information: 	at com.intellij.rt.compiler.JavacRunner.main(JavacRunner.java:49)
Error:  line (0) The compiler did not terminate normally. Exit code is 4



REPRODUCIBILITY :
This bug can be reproduced always.
(Incident Review ID: 231734) 
======================================================================
Posted Date : 2005-09-23 22:03:03.0
Work Around
The most likely cause of this problem is a corrupt
jar file.  However, it is also possible that the
compiler runs out of memory.  So if you suspect
you're running out of memory, try increasing the
system memory or compiling a smaller set of files.

When reducing the set of files to compile, the
-sourcepath compiler option can be useful.
Evaluation
This bug report lacks a reproducible test case.

The most likely cause of this problem is a corrupted jce.jar file.

  xxxxx@xxxxx   2004-01-13
The compiler must catch such errors and diagnose the problem:
a corrupt jar file.
Posted Date : 2005-09-23 22:03:03.0

Summary: If there are errors getting the entry, the return value is always 0.  An error in this case could be out of memory, or a corrupt jar file.

Detail:

ZipFile.entries().nextEntry()    // ZipFile.java
    Java_java_utilzip_ZipFile_getNextEntry()    // ZipFile.c
        ZIP_getNextEntry()    // zip_util.c
            newEntry()    // zip_util.c

The result of newEntry() is what ultimately determines the value of jzentry that is reported in the stack traces.  zip_util.c is compiled with -DUSE_MMAP.  As best I can tell, the return value will be NULL only if malloc returns NULL.  So perhaps they're compiling on machines with limited memory.  Doubtful.  But if the jar file has an entry that is corrupt in its name, "extra data" or comment, such that an unreasonably-large malloc is attempted, that could fail, and the result would be jzentry = 0 as we've seen.
Posted Date : 2005-09-28 20:29:25.0

As part of the work for JSR 199 (javax.tools), this problem will be
diagnosed better.
Posted Date : 2006-06-14 05:18:51.0

No regression test included as I'm not able to reproduce the problem.
I tried modifying a jar so that one of its entries was too large but
I just get:

java.util.zip.ZipException: unexpected EOF
        at java.util.zip.ZipInputStream.read(ZipInputStream.java:166)
        at sun.tools.jar.Main.extractFile(Main.java:819)
        at sun.tools.jar.Main.extract(Main.java:754)
        at sun.tools.jar.Main.run(Main.java:210)
        at sun.tools.jar.Main.main(Main.java:1014)
Posted Date : 2006-06-18 19:17:37.0

See bug 4615343 for a description of the changes made to the zip file
implementation.
Posted Date : 2006-10-03 20:46:58.0
Comments
  
  Include a link with my name & email   

Submitted On 26-JAN-2004
dplass
Got the same thing in 1.3:

Compiling 1 source file to 
C:\Allprojects\lib\tci\com.tci.credit\build\classes
    [javac] An exception has occurred in the compiler 
(1.3.0). Please file a bug at the Java Developer 
Connection (http://java.sun.com/cgi-bin/bugreport.cgi).  
Include your program and the following diagnostic in 
your report.  Thank you.
    [javac] java.lang.InternalError: jzentry == 0
    [javac] 	at java.util.zip.ZipFile$2.nextElement
(ZipFile.java:297)
    [javac] 	at 
com.sun.tools.javac.v8.code.ClassReader.openArchive
(ClassReader.java:893)
    [javac] 	at 
com.sun.tools.javac.v8.code.ClassReader.list
(ClassReader.java:1095)
    [javac] 	at 
com.sun.tools.javac.v8.code.ClassReader.listAll
(ClassReader.java:1180)
    [javac] 	at 
com.sun.tools.javac.v8.code.ClassReader.fillIn
(ClassReader.java:1202)
    [javac] 	at 
com.sun.tools.javac.v8.code.ClassReader.complete
(ClassReader.java:955)
    [javac] 	at 
com.sun.tools.javac.v8.code.Symbol.complete
(Symbol.java:366)
    [javac] 	at 
com.sun.tools.javac.v8.comp.Enter._case
(Enter.java:424)
    [javac] 	at 
com.sun.tools.javac.v8.tree.Tree$TopLevel.visit
(Tree.java:349)
    [javac] 	at 
com.sun.tools.javac.v8.comp.Enter.classEnter
(Enter.java:392)
    [javac] 	at 
com.sun.tools.javac.v8.comp.Enter.classEnter
(Enter.java:410)
    [javac] 	at com.sun.tools.javac.v8.comp.Enter.main
(Enter.java:540)
    [javac] 	at 
com.sun.tools.javac.v8.JavaCompiler.compile
(JavaCompiler.java:357)
    [javac] 	at com.sun.tools.javac.v8.Main.compile
(Main.java:247)
    [javac] 	at com.sun.tools.javac.Main.compile
(Main.java:26)
    [javac] 	at java.lang.reflect.Method.invoke(Native 
Method)
    [javac] 	at 
org.apache.tools.ant.taskdefs.compilers.Javac13.exec
ute(Javac13.java:100)
    [javac] 	at 
org.apache.tools.ant.taskdefs.Javac.compile
(Javac.java:840)
    [javac] 	at 
org.apache.tools.ant.taskdefs.Javac.execute
(Javac.java:682)
    [javac] 	at org.apache.tools.ant.Task.perform
(Task.java:319)
    [javac] 	at org.apache.tools.ant.Target.execute
(Target.java:309)
    [javac] 	at 
org.apache.tools.ant.Target.performTasks
(Target.java:336)
    [javac] 	at 
org.apache.tools.ant.Project.executeTarget
(Project.java:1306)
    [javac] 	at 
org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
    [javac] 	at org.apache.tools.ant.Task.perform
(Task.java:319)
    [javac] 	at org.apache.tools.ant.Target.execute
(Target.java:309)
    [javac] 	at 
org.apache.tools.ant.Target.performTasks
(Target.java:336)
    [javac] 	at 
org.apache.tools.ant.Project.executeTarget
(Project.java:1306)
    [javac] 	at 
org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
    [javac] 	at 
org.apache.tools.ant.taskdefs.CallTarget.execute
(CallTarget.java:143)
    [javac] 	at org.apache.tools.ant.Task.perform
(Task.java:319)
    [javac] 	at org.apache.tools.ant.Target.execute
(Target.java:309)
    [javac] 	at 
org.apache.tools.ant.Target.performTasks
(Target.java:336)
    [javac] 	at 
org.apache.tools.ant.Project.executeTarget
(Project.java:1306)
    [javac] 	at 
org.apache.tools.ant.Project.executeTargets
(Project.java:1250)
    [javac] 	at org.apache.tools.ant.Main.runBuild
(Main.java:610)
    [javac] 	at org.apache.tools.ant.Main.start
(Main.java:196)
    [javac] 	at org.apache.tools.ant.Main.main
(Main.java:235)


Submitted On 12-FEB-2004
xjgu
I got the same error when compiling files generated by 
AXIS 1.1. I was using 1.4.1_02.


Submitted On 16-MAR-2004
ravi_balla
I am getting the error when ever I am trying to build an 
application. Could this be caused with an uninstall of 
an older version and re-install of a newer version of 
j2EE, which I did, in this case?


Submitted On 27-MAY-2004
OysteinA
I get the same error when compiling on jdk 1.3.1_02. Thought it might be the version. The error does not seem to be concistent. It is thrown every other time or so.


Submitted On 10-JUN-2004
rxjunk
I'm getting this problem on Linux JDK 1.4.1_01 with a xerces.jar file that shows no signs of corruption (it unjars just fine). The compile has worked find in the past, but now always fails.


Submitted On 06-OCT-2004
Nigel_Southall
I've started getting this on 1.4.1_06.


Submitted On 23-AUG-2005
Svd
This bug is reproducible on jdk 1.5.0_02.
I'm trying to build WSRP4J (http://ws.apache.org/wsrp4j/) and I'm getting the following error:

...
compile:
Compiling 273 source files to D:\Work\apache\portals\ws-wsrp4j\bin\classes
This version of java does not support the classic compiler; upgrading to modern
An exception has occurred in the compiler (1.5.0_02). Please file a bug at the J
ava Developer Connection (http://java.sun.com/webapps/bugreport)  after checking
 the Bug Parade for duplicates. Include your program and the following diagnosti
c in your report.  Thank you.
java.lang.InternalError: jzentry == 0,
 jzfile = 228544,
 total = 12914,
 name = D:\Java\jdk1.5.0_02\jre\lib\rt.jar,
 i = 7340,
 message = invalid LOC header (bad signature)
        at java.util.zip.ZipFile$3.nextElement(ZipFile.java:430)
        at java.util.zip.ZipFile$3.nextElement(ZipFile.java:416)
        at com.sun.tools.javac.jvm.ClassReader.openArchive(ClassReader.java:1442
)
        at com.sun.tools.javac.jvm.ClassReader.list(ClassReader.java:1719)
        at com.sun.tools.javac.jvm.ClassReader.listAll(ClassReader.java:1859)
        at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1873)
        at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1521)
        at com.sun.tools.javac.code.Symbol.complete(Symbol.java:355)
        at com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:249)
        at com.sun.tools.javac.tree.Tree$TopLevel.accept(Tree.java:386)
        at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:214)
        at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:228)
        at com.sun.tools.javac.comp.Enter.complete(Enter.java:441)
        at com.sun.tools.javac.comp.Enter.main(Enter.java:426)
        at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:413)
        at com.sun.tools.javac.main.Main.compile(Main.java:592)
        at com.sun.tools.javac.main.Main.compile(Main.java:544)
        at com.sun.tools.javac.Main.compile(Main.java:67)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:
100)
        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:840)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
        at org.apache.tools.ant.Task.perform(Task.java:319)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
        at org.apache.tools.ant.Main.runBuild(Main.java:610)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)

BUILD FAILED


Submitted On 22-APR-2006
This bug is reproducible on jdk 1.5.0_06
I'm trying to run simple unit test (junit-3.8.1). The message:
    [javac] An exception has occurred in the compiler (1.5.0_06). Please file a
bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  af
ter checking the Bug Parade for duplicates. Include your program and the followi
ng diagnostic in your report.  Thank you.
    [javac] java.lang.InternalError: jzentry == 0,
    [javac]  jzfile = 2350272,
    [javac]  total = 699,
    [javac]  name = D:\Programs\java\jdk1.5.0_06\jre\lib\charsets.jar,
    [javac]  i = 515,
    [javac]  message = invalid LOC header (bad signature)
    [javac]     at java.util.zip.ZipFile$3.nextElement(ZipFile.java:429)
    [javac]     at java.util.zip.ZipFile$3.nextElement(ZipFile.java:415)
    [javac]     at com.sun.tools.javac.jvm.ClassReader.openArchive(ClassReader.j
ava:1447)
    [javac]     at com.sun.tools.javac.jvm.ClassReader.list(ClassReader.java:174
2)
    [javac]     at com.sun.tools.javac.jvm.ClassReader.listAll(ClassReader.java:
1882)
    [javac]     at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1
901)
    [javac]     at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java
:1538)
    [javac]     at com.sun.tools.javac.code.Symbol.complete(Symbol.java:355)
    [javac]     at com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:256)
    [javac]     at com.sun.tools.javac.tree.Tree$TopLevel.accept(Tree.java:382)
    [javac]     at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:221)
    [javac]     at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:235)
    [javac]     at com.sun.tools.javac.comp.Enter.complete(Enter.java:448)
    [javac]     at com.sun.tools.javac.comp.Enter.main(Enter.java:433)
    [javac]     at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.ja
va:403)
    [javac]     at com.sun.tools.javac.main.Main.compile(Main.java:592)
    [javac]     at com.sun.tools.javac.main.Main.compile(Main.java:544)
    [javac]     at com.sun.tools.javac.Main.compile(Main.java:67)
    [javac]     at com.sun.tools.javac.Main.main(Main.java:52)


Submitted On 27-JUN-2006
olivier_thomann
This looks similar to bug 4615343.
The fix might be to fix the libraries to throw an exception in this case instead of an error.
Could you please describe what has been done to fix this bug?


Submitted On 02-OCT-2006
Hello,

How can we resolve the issue?

Thanks



PLEASE NOTE: JDK6 is formerly known as Project Mustang