PRB: NoClassDefFoundError Accessing a COM Object Through Java (178560)
The information in this article applies to:
- Microsoft Visual J++ 1.0
- Microsoft Visual J++ 1.1
- Microsoft virtual machine
- Microsoft SDK for Java 2.0
- Microsoft SDK for Java 2.01
- Microsoft SDK for Java 2.02
- Microsoft SDK for Java 3.0
- Microsoft SDK for Java 3.1
- Microsoft SDK for Java 3.2
This article was previously published under Q178560 SYMPTOMS
When executing a Java Application that calls a COM object like an ATL
Server, you may sometimes get the following error message on the COM
object:
error: java.lang.NoClassDefFoundError:
The error occurs on the line where you create a new COM object in the Java
Class.
CAUSE
One reason why you may get this error could be related to missing parameter
attributes for the methods in the COM object's IDL file.
RESOLUTION
Check your methods in the IDL file so that they have the right attributes
like [in],[out],[retval] and so on. Once modifying the IDL file, rebuild
your COM Server, and rerun JavaTLB or JACTIVEX on the COM Object's Type
Library so that the changes gets reflected.
STATUS
This behavior is by design.
REFERENCES
For support information about Visual J++ and the SDK for Java, visit the following Microsoft Web site:
Modification Type: | Major | Last Reviewed: | 6/14/2006 |
---|
Keywords: | kbprb KB178560 |
---|
|