[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/25520] New: RMI serialization of non-native serializable
From: |
c dot locke at realdigitalmedia dot com |
Subject: |
[Bug classpath/25520] New: RMI serialization of non-native serializable members does not work |
Date: |
21 Dec 2005 17:53:22 -0000 |
Overview:
When attempting to invoke an RMI method, if any parameter is an object that is
serializable but not a native class, the ObjectStreamField(String name, String
typename, ClassLoader loader) constructor will not find the correct class type
even when the ObjectInputStream.readClassDescriptor() method has properly read
the descriptor from the real stream.
Given:
class Bar implements java.io.Serializable
{
public Bar()
{ }
private String myString = "I am bar";
}
class Foo implements java.io.Serializable
{
public Foo()
{ }
public toString()
{
return myString;
}
private String myString = "I am Foo";
private Bar myBar = new Bar();
}
interface SimpleInterface
{
void doIt(Foo foo_i);
}
Assuming that you've written a service object that implements this method, when
you invoke the doIt() method, the following exception is raised:
java.rmi.UnexpectedException: undeclared checked exception; nested exception
is:
java.io.InvalidClassException: invalid field type for myBar in class
Foo.
I have a complete code sample that exhibits this behaviour that can be made
available.
--
Summary: RMI serialization of non-native serializable members
does not work
Product: classpath
Version: 0.19
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: classpath
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: c dot locke at realdigitalmedia dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25520
- [Bug classpath/25520] New: RMI serialization of non-native serializable members does not work,
c dot locke at realdigitalmedia dot com <=