Bug 223112 - ClassFormatException when adding library
Summary: ClassFormatException when adding library
Status: VERIFIED NOT_ECLIPSE
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-18 14:50 EDT by Frederic CLA
Modified: 2008-04-29 10:45 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic CLA 2008-03-18 14:50:30 EDT
Build ID: I20070625-1500

Steps To Reproduce:
1.Create a new Java Project
2.Add the library as a dependency


More information:
Offending libraries come for the BEA weblogic server 10 distribution (Maintenance Pack 1).



Error 1
eclipse.buildId=I20070625-1500
java.version=1.5.0_11
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en
Command-line arguments:  -data C:\javadev\tools\eclipse-3.3\workspace2 -os win32 -ws win32 -arch x86 -clean

Error
Tue Mar 18 19:45:34 CET 2008
ClassFormatException in C:/javadev/tools/bea/10.0MP1/wlserver_10.0/server/lib/webserviceclient+ssl.jar|weblogic/utils/io/ChunkManager.class. Please report this issue to JDT/Core including the problematic document

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(Thread.java:595)

Error 2:
eclipse.buildId=I20070625-1500
java.version=1.5.0_11
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en
Command-line arguments:  -data C:\javadev\tools\eclipse-3.3\workspace2 -os win32 -ws win32 -arch x86 -clean

Error
Tue Mar 18 19:45:33 CET 2008
ClassFormatException in C:/javadev/tools/bea/10.0MP1/wlserver_10.0/server/lib/webserviceclient+ssl.jar|javax/mail/internet/MimeUtility$1$NullInputStream.class. Please report this issue to JDT/Core including the problematic document

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(Thread.java:595)
Comment 1 Frederic CLA 2008-03-18 15:00:28 EDT
I've checked this on the on of the latest Ganymede builds.
I do not get an error, but a warning:

eclipse.buildId=I20071213-1700
java.version=1.6.0_01
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en
Command-line arguments:  -os win32 -ws win32 -arch x86 -clean


Warning
Tue Mar 18 19:55:19 CET 2008
The Java indexing could not index C:/javadev/tools/bea/10.0MP1/wlserver_10.0/server/lib/webserviceclient+ssl.jar|weblogic/utils/io/ChunkManager.class. This .class file doesn't follow the class file format specification. Please report this issue against the .class file vendor




So I think the problem has been solved in the meanwhile, assuming the class is really not conform the class file format specification. I'll file this issue to BEA.
Comment 2 Olivier Thomann CLA 2008-03-26 12:43:19 EDT
I need access to the two .class files:
C:/javadev/tools/bea/10.0MP1/wlserver_10.0/server/lib/webserviceclient+ssl.jar|javax/mail/internet/MimeUtility$1$NullInputStream.class.
and
C:/javadev/tools/bea/10.0MP1/wlserver_10.0/server/lib/webserviceclient+ssl.jar|weblogic/utils/io/ChunkManager.class
for further investigation.
Comment 3 Olivier Thomann CLA 2008-03-26 15:34:31 EDT
Dropping severity as I don't believe this is a problem with Eclipse as long as I cannot check the two .class files.
All previous errors of this kind ended up being corrupted .class files.
Comment 4 Olivier Thomann CLA 2008-03-28 21:24:34 EDT
(In reply to comment #1)
> So I think the problem has been solved in the meanwhile, assuming the class is
> really not conform the class
No, the problem has not been solved. We simply report it differently as we encountered this case too many times.
I need access to the two .class files otherwise this bug will be closed as INVALID. Without the .class files, I cannot do any further investigation.
Comment 5 Walter Harley CLA 2008-03-31 14:35:01 EDT
Looking at webserviceclient+ssl.jar from the specified version of BEA WebLogic Server, I see that those two files are zero length.

I am not sure how a zero-length class file officially should be treated, but ClassFormatException doesn't seem inappropriate.

This sounds like a BEA problem, not an Eclipse problem.
Comment 6 Frederic CLA 2008-04-02 03:26:54 EDT
(In reply to comment #5)
I confirm, both class files have zero length. So this seems indeed a BEA issue.
OK for me to close this bug.

Comment 7 Olivier Thomann CLA 2008-04-02 09:00:20 EDT
Closing as NOT_ECLIPSE.
There is something wrong with the two .class files. Walter, I think it is perfectly legitimate to report a ClassFormatException in this case as we try to read a .class file and we don't recognize its structure.
Comment 8 Kent Johnson CLA 2008-04-29 10:45:42 EDT
Verified for 3.4M7 using I20080429-0100