Bug 197733 - ClassFormatException when using icu4j.jar library(com.ibm.icu.impl.data.LocaleElements_zh_PINYN.class)
Summary: ClassFormatException when using icu4j.jar library(com.ibm.icu.impl.data.Local...
Status: VERIFIED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.4 M1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 219296 222532 514175 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-24 22:18 EDT by Dongsu Lee CLA
Modified: 2017-04-03 00:09 EDT (History)
3 users (show)

See Also:


Attachments
class file (100.28 KB, application/octet-stream)
2007-07-25 12:41 EDT, Dongsu Lee CLA
no flags Details
the class file (82.82 KB, application/java)
2007-07-25 12:58 EDT, Dongsu Lee CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dongsu Lee CLA 2007-07-24 22:18:30 EDT
!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)
Comment 1 Olivier Thomann CLA 2007-07-25 12:31:54 EDT
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.
Comment 2 Dongsu Lee CLA 2007-07-25 12:41:34 EDT
Created attachment 74593 [details]
class file

here is the class file which causes the probem
Comment 3 Olivier Thomann CLA 2007-07-25 12:51:31 EDT
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 ?
Comment 4 Dongsu Lee CLA 2007-07-25 12:58:07 EDT
Created attachment 74594 [details]
the class file

sorry, I've uploaded a wrong file. Here is the right one.
Comment 5 Olivier Thomann CLA 2007-07-25 13:13:00 EDT
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?
Comment 6 Dongsu Lee CLA 2007-07-25 17:40:56 EDT
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.
Comment 7 Olivier Thomann CLA 2007-07-25 20:14:51 EDT
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.
Comment 8 Olivier Thomann CLA 2007-07-25 20:30:27 EDT
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.
Comment 9 Dongsu Lee CLA 2007-07-25 20:38:06 EDT
The one I downloaded is the latest version of ICU4J(icu4j_3_6_1.zip).

Thank you so much.
Comment 10 Frederic Fusier CLA 2007-12-20 06:57:35 EST
Verified by reporter
Comment 11 Olivier Thomann CLA 2008-02-18 08:50:10 EST
*** Bug 219296 has been marked as a duplicate of this bug. ***
Comment 12 Olivier Thomann CLA 2008-03-26 12:40:45 EDT
*** Bug 222532 has been marked as a duplicate of this bug. ***
Comment 13 Jay Arthanareeswaran CLA 2017-04-03 00:09:12 EDT
*** Bug 514175 has been marked as a duplicate of this bug. ***