Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002028 [Resin] minor always 09-25-07 09:16 09-28-07 13:36
Reporter ferg View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.1.3 Product Version 3.1.2
  Product Build
Summary 0002028: Hessian: Unsupported operation exception
Description (rep by Jerome Landreau)


I am using Hessian version 3.1.2 and I have an exception when I try to deserialize my object:

java.lang.UnsupportedOperationException: com.caucho.hessian.io.CollectionDeserializer@152dd7b
        at com.caucho.hessian.io.AbstractDeserializer.readLengthList(AbstractDeserializer.java:77)
        at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1839)
        at com.caucho.hessian.io.MapDeserializer.readMap(MapDeserializer.java:117)
        at com.caucho.hessian.io.SerializerFactory.readMap(SerializerFactory.java:347)
        at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1845)
        at com.caucho.hessian.io.MapDeserializer.readMap(MapDeserializer.java:117)
        at com.caucho.hessian.io.SerializerFactory.readMap(SerializerFactory.java:347)
        at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1845)
        at com.caucho.hessian.io.CollectionDeserializer.readList(CollectionDeserializer.java:111)
        at com.caucho.hessian.io.SerializerFactory.readList(SerializerFactory.java:333)
        at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1827)
        at com.caucho.hessian.io.CollectionDeserializer.readList(CollectionDeserializer.java:111)
        at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1577)
        at com.caucho.hessian.io.JavaDeserializer$ObjectFieldDeserializer.deserialize(JavaDeserializer.java:375)
        at com.caucho.hessian.io.JavaDeserializer.readObject(JavaDeserializer.java:228)

This is the code that I am using to deserialize my object is:

ByteArrayInputStream bais = new ByteArrayInputStream(data);
Hessian2Input in = new Hessian2Input(bais);
Object o = in.readObject();
in.close();

After some debugging, I have found that the problem is in this part of the method "Hessian2Input.readObject()":

case 'v': {
      int ref = readInt();
      String type = (String) _types.get(ref);
      int length = readInt();
      
      Deserializer reader;
      reader = findSerializerFactory().getObjectDeserializer(type);
      
      return reader.readLengthList(this, length);
    }

The type is a custom class which implements java.util.List and the reader is an instance of CollectionDeserializer wich extends the class AbstractDeserializer.
The problem is that CollectionDeserializer doesnt't override the readLengthList method of the class AbstractDeserializer which throws an UnsuportedException.
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0002315)
ferg
09-28-07 13:36

hessian/3b2j
 

- Issue History
Date Modified Username Field Change
09-25-07 09:16 ferg New Issue
09-28-07 13:36 ferg Note Added: 0002315
09-28-07 13:36 ferg Assigned To  => ferg
09-28-07 13:36 ferg Status new => closed
09-28-07 13:36 ferg Resolution open => fixed
09-28-07 13:36 ferg Fixed in Version  => 3.1.3


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