Mantis - Resin
Viewing Issue Advanced Details
17 minor always 03-03-05 00:00 05-11-05 00:00
joshh  
 
normal  
closed  
fixed  
none    
none 3.0.13  
0000017: Hessian readResolve writeReplace issues.
RSN-7
Hessian has problems serializing objects that use readResolve and writeReplace methods.

- Will not call readReplace or writeResolve unless they are declared public. This is not a huge issue, but normally these methods can be given any modifier and it will work.
- When I change the methods to public and readReplace/writeResolve is used on an object I get the following error:

com.caucho.hessian.io.HessianProtocolException: testing_Test: unknown code:z
        at com.caucho.hessian.io.HessianInput.error(HessianInput.java:1640)
        at com.caucho.hessian.io.HessianInput.readObject(HessianInput.java:1143)
        at com.caucho.hessian.io.JavaDeserializer.readMap(JavaDeserializer.java:141)
        at com.caucho.hessian.io.JavaDeserializer.readMap(JavaDeserializer.java:105)
        at com.caucho.hessian.io.HessianInput.readObject(HessianInput.java)
        at _ejb.nms.ejb.RepriceEngine__HessianSkel._execute(RepriceEngine__HessianSkel.java:22)
        at com.caucho.ejb.hessian.HessianSkeleton._service(HessianSkeleton.java:93)
        at com.caucho.ejb.EJBServlet.service(EJBServlet.java:205)
        at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:99)
        at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:163)
        at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:208)
        at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:259)
        at com.caucho.server.port.TcpConnection.run(TcpConnection.java:341)
        at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:467)
        at com.caucho.util.ThreadPool.run(ThreadPool.java:408)
        at java.lang.Thread.run(Thread.java:534)

Attached is a very simple object that I tried to serialize using hessian that will demonstrate the issue.
Resin 3.0.12
Java 1.4.2_07
Windows XP SP2

Notes
(0000014)
ferg   
03-03-05 00:00   
ejb/334a, ejb/3257