Issue1011738
Created on 2004-08-18.20:03:12 by anonymous, last changed 2006-05-24.17:51:27 by fwierzbicki.
File name |
Uploaded |
Description |
Edit |
Remove |
PyException_RMI.patch
|
nobody,
2004-08-18.20:03:13
|
PyException RMI serializability fix |
|
|
msg2394 (view) |
Author: Nobody/Anonymous (nobody) |
Date: 2004-08-18.20:03:12 |
|
Let's say that you've got some Jython classes whose
methods are exported via RMI. The remote client invokes
one of these methods, and a PyException is thrown.
The RMI system takes that exception, wraps it inside of
a java.rmi.RemoteException object, serializes the
resulting object, and sends it over the wire back to
the client.
The problem is that PyException can't be deserialized
by the vanilla ObjectInputStream that RMI uses...you
get wonderful UnmarshalExceptions due to the fact that
"java.lang.method objects aren't serializable" (I can
supply a full stack trace if necessary). And there's no
way I can tell to make RMI use PythonObjectInputStream
instead.
My fix has been to modify PyException.java so that when
a PyException is constructed, we do a toString() on it
and store the result in an instance variable. The other
PyObject instance variables (value, traceback, and
type) are marked transient. I then modified
printStackTrace() to print out this String
representation of the traceback if
Py.displayException() won't work.
Patch is against CVS tag Release_2_1.
Is there a better approach to fixing this problem?
Cheers,
Deepak Giridharagopal
deepak@arlut.utexas.edu
|
msg2395 (view) |
Author: Samuele Pedroni (pedronis) |
Date: 2005-01-09.20:14:38 |
|
Logged In: YES
user_id=61408
I think we need a way to first reproduce the problem and
then think exactly what we want to do.
|
msg2396 (view) |
Author: Frank Wierzbicki (fwierzbicki) |
Date: 2006-05-24.17:51:27 |
|
Logged In: YES
user_id=193969
Since no test ever came back, I'm closing.
|
|
Date |
User |
Action |
Args |
2004-08-18 20:03:12 | anonymous | create | |
|