Community
Participate
Working Groups
!ENTRY org.eclipse.jdt.core 4 4 2007-07-25 11:11:47.596 !MESSAGE ClassFormatException in SFA_HM_benz/WEB-INF/lib/icu4j.jar|com/ibm/icu/impl/data/LocaleElements_zh__PINYIN.class . Please report this issue to JDT/Core including the problematic document !STACK 0 org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException at org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.<init>(ClassFileReader.java:342) at org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.<init>(ClassFileReader.java:121) at org.eclipse.jdt.internal.core.search.indexing.BinaryIndexer.indexDocument(BinaryIndexer.java:622) at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.indexDocument(JavaSearchParticipant.java:74) at org.eclipse.jdt.internal.core.search.indexing.IndexManager.indexDocument(IndexManager.java:314) at org.eclipse.jdt.internal.core.search.indexing.AddJarFileToIndex.execute(AddJarFileToIndex.java:197) at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:392) at java.lang.Thread.run(Unknown Source)
Would it be possible to get the .class file called com/ibm/icu/impl/data/LocaleElements_zh__PINYIN.class, located in the jar: SFA_HM_benz/WEB-INF/lib/icu4j.jar? Thanks.
Created attachment 74593 [details] class file here is the class file which causes the probem
This .class file is corrupted. It doesn't start with the magic number 0xCAFEBABE. Do you know how this .class file was produced? The name of the file you attached is CollationElements_zh__PINYIN.col. Are you sure this is a .class file ?
Created attachment 74594 [details] the class file sorry, I've uploaded a wrong file. Here is the right one.
javap and the Eclipse disassembler are both failing to read this .class file because of an invalid constant pool entry. d:\tests_sources>javap -c -v -s com.ibm.icu.impl.data.LocaleElements_zh__PINYIN java.lang.ClassFormatError: invalid constant type: 60 at sun.tools.javap.ClassData.readCP(ClassData.java:180) at sun.tools.javap.ClassData.read(ClassData.java:81) at sun.tools.javap.ClassData.<init>(ClassData.java:52) at sun.tools.javap.JavapPrinter.<init>(JavapPrinter.java:30) at sun.tools.javap.Main.displayResults(Main.java:201) at sun.tools.javap.Main.perform(Main.java:61) at sun.tools.javap.Main.entry(Main.java:49) at sun.tools.javap.Main.main(Main.java:34) org.eclipse.jdt.core.util.ClassFormatException at org.eclipse.jdt.internal.core.util.ClassFileReader.<init>(ClassFileReader.java:144) at org.eclipse.jdt.internal.core.util.Disassembler.disassemble(Disassembler.java:290) at org.eclipse.jdt.core.tools.disassembler.Disassemble.main(Disassemble.java:114) And this fails on the line: throw new ClassFormatException(ClassFormatException.INVALID_TAG_CONSTANT); Do you know how this .class file has been produced?
I don't know much about the library because it was included in our project. maybe one of our team member would download it from a website to use it. it's for unicode and globalization support(especially calculating lunar calendar to us) as you might know. it has been existed since the project started(about 2 years ago). It has no problem on eclipse 3.2.2 but on eclipse 3.3 -_-; Anyway, after getting a new version of icu4j.jar, I did not see the error anymore. I downloaded the library on the website: http://www.icu-project.org/ Thank you for your help.
In Eclipse 3.2.2, we did not log about corrupted .class files that the indexer could not successfully indexed. This is why you can have the feeling that it worked better using 3.2.2. Since it now works fine once you downloaded a new version of the library, I am closing it as INVALID. Could you please let me know what version of the library you retrieved (the one that works now)? Thanks. I'll check myself the version of the library you are using once I get it.
For your information, this link seems to point to the same issue. It seems to be a well-known problem with this version of ICU4J. http://jira.codehaus.org/browse/JAXEN-173. I retrieved the old version icu4j_2_8.jar which is the version that follows the one that is corrupted and the same .class file seems to be fine. The source zip corresponding to version 2.6.1 is also corrupted. So I cannot try to rebuild it. In latest version, the same .class file doesn't exist anymore. There is nothing else I can do in this case.
The one I downloaded is the latest version of ICU4J(icu4j_3_6_1.zip). Thank you so much.
Verified by reporter
*** Bug 219296 has been marked as a duplicate of this bug. ***
*** Bug 222532 has been marked as a duplicate of this bug. ***
*** Bug 514175 has been marked as a duplicate of this bug. ***