Hello,

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

java.lang.UnsupportedOperationException: 
[EMAIL PROTECTED]
        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.

Is it a bug, or did I miss something?




_______________________________________________
hessian-interest mailing list
[email protected]
http://maillist.caucho.com/mailman/listinfo/hessian-interest

Reply via email to