Issue 78308 - IllegalArgumentException not Serializable
Summary: IllegalArgumentException not Serializable
Status: ACCEPTED
Alias: None
Product: udk
Classification: Code
Component: code (show other issues)
Version: OOo 2.0.4
Hardware: All All
: P3 Trivial (vote)
Target Milestone: 4.x
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-11 15:51 UTC by ronald15
Modified: 2017-05-20 11:31 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ronald15 2007-06-11 15:51:33 UTC
The class:

IllegalArgumentException (I couldn't find out which package)
has a field named
Context in which an object $Proxy0 is set.

The Exception inherits from Throwable which implements the interface Serializable.
The Proxy is not serializable. The defect can be seen by looking i.e. static
analysis of the code.

Serialisation leads the following Exception:
java.io.NotSerializableException:
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
 
Thanks for fixing this since this causes us quite a headache. Our application
sends any exception encountered on the server to the client, so that debugging
is simplified.

Yours,

Stefan
Comment 1 jsc 2007-06-11 16:12:01 UTC
jsc -> sb: you volunteered to comment on this issue
Comment 2 Stephan Bergmann 2007-06-12 09:01:23 UTC
Java serialization and UNO are at odds.  In a sense, URP is UNO's replacement
for Java serialization.  Anyway, since some of the Java types representing UNO
type system entities are (indirectly) serializable (e.g., all UNO exception
types are represented by subtypes of java.lang.Throwable), something should be
done about this.

For all Java representations of UNO type system entities but for Java
representations of non-null references to UNO objects (UNO interface types),
adding serialization should be fairly straightforward.  Remains the question how
to serialize such non-null object references.  (All UNO types can recursively be
contained in UNO exception types, so even if we restricted ourselves to fixing
just the exception serialization problem, we would end fixing the generalized
serialization problem.)

For a non-null UNO object reference of interface type T (where T should probably
be the static type of the reference if it is a component of a sequence type or a
member of a struct or exception type, and the dynamic type T' if it is the value
<T',v> of an ANY), deserialization should probably produce a Java object that
implements all the methods of T (plus com.sun.star.uno.IQueryInterface) and
throws some specific java.lang.RuntimeException (like a
DeserializedUnoObjectReferenceException) on every method invocation.  (In
general, it cannot work to serialize references to UNO objects and guarantee
that they are still functional upon deserialization, so this is probably the
closest possible general approximation.)

@ronald15:  If you need a quick solution, I would suggest you either use UNO to
send exceptions from server to client, or send toString-representations of the
exceptions.
Comment 3 Martin Hollmichel 2007-12-07 13:00:37 UTC
set target to 3.x according to http://wiki.services.openoffice.org/wiki/Target_3x
Comment 4 Marcus 2017-05-20 11:31:11 UTC
Reset assigne to the default "issues@openoffice.apache.org".