Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000070 [Resin] minor always 03-01-05 00:00 02-03-06 09:43
Reporter anahapetian View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0000070: hessian ThrowableSerializer does not serialize fields of subclasses of Throwable
Description RSN-61
The hessian ThrowableSerializer does not serialize fields in subclasses of Throwable.
this results in all data in the fields of the Exception being lost.
for example if i make a subclass of Exception with a new field "int code", this will never be
serialized, leaving it always to its default of null;

The reason for this is that throwable serializer extends JavaSerializer, and passes java.lang.Throwable.class as an argument to the super() constructor.
since the JavaSerializer gets the fields of this value, none of the actual instances class fields
are serialized.

The problem is solve if the following code is modified:
public class ThrowableSerializer extends JavaSerializer {
  public ThrowableSerializer()
  {
    super(Throwable.class);
  }
.........
to
public class ThrowableSerializer extends JavaSerializer {
  public ThrowableSerializer(Class clazz)
  {
    super(clazz);
  }
and the Method Constructing the ThrowableSerializer passes the actual class of the Exception
object to the constructor.
Additional Information linux
Attached Files

- Relationships

- Notes
(0000859)
ferg
02-03-06 09:43

ejb/234e
 

- Issue History
Date Modified Username Field Change
03-01-05 00:00 anahapetian New Issue
02-03-06 09:43 ferg Note Added: 0000859
02-03-06 09:43 ferg Assigned To  => ferg
02-03-06 09:43 ferg Status acknowledged => closed
02-03-06 09:43 ferg Resolution open => fixed
02-03-06 09:43 ferg Fixed in Version  => 3.0.17


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker