BUG: You receive a "does not implement interface member" compilation error message in a JLCA-converted Visual J++ project with a class that implements java.io.Serializable (814903)
The information in this article applies to:
- Microsoft Visual J++ 6.0
- Microsoft Visual C# .NET (2003)
- Microsoft Visual C# .NET (2002)
- Microsoft Visual J++ 1.0
SYMPTOMSYou may receive the following error message: 'Class Name' does not implement
interface member
'System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo,
System.Runtime.Serialization.StreamingContext)' You may receive this
error message if all the following conditions are true:
- You have a Visual J++ project with a class that implements
the java.io.Serializable interface.
- You convert your Visual J++ project to a Visual C# .NET
project by using the Java Language Conversion Assistant (JLCA).
- You try to compile the generated Visual C# .NET
project.
CAUSEIn the Microsoft .NET Framework, the equivalent for the java.io.Serializable interface is the System.Runtime.Serialization.ISerializable interface. However, when you convert the Visual J++ project, JLCA
does not add the implementation for the GetObjectData method of the ISerializable interface.WORKAROUNDTo work around this problem, implement the GetObjectData method in the generated Visual C# .NET class. To do so, follow
these steps after you convert the Visual J++ project based on the steps in the
"Steps to Reproduce the Behavior" section of this article:
- On the View menu, click Class
View.
- In the Class View pane, expand the following nodes:
- MyVJTestApplication
- Employee
- Bases and Interfaces
- Right-click ISerializable, point to
Add, and then click Implement
Interface.
Note A default implementation is added to the GetObjectData method in step 6 of the steps in the "Steps to Reproduce the
Behavior" section of this article. You may not receive any compilation errors
when you add the default implementation. However, you may add required
information to the SerializationInfo object. STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed at the beginning of this article.
REFERENCESFor more information about the Java Language Conversion
Assistant (JLCA), visit the following Microsoft Developer Network (MSDN) Web
site:
Modification Type: | Minor | Last Reviewed: | 1/19/2006 |
---|
Keywords: | kberrmsg kbCodeGen kbconvert kbSerial kbJava kbbug KB814903 kbAudDeveloper |
---|
|