Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004083 [Resin] minor always 06-17-10 10:55 01-19-11 17:43
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 4.0.15 Product Version
  Product Build
Summary 0004083: CanDI serialization/deserialization
Description (rep by sweigersf)

I am trying to serialize and deserialize a CDI managed bean using Hessian:

Code:

@Inject MyBean sb;

...

ByteArrayOutputStream bos = new ByteArrayOutputStream();
Hessian2Output os = new Hessian2Output(bos);
os.writeObject(sb);

ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
Hessian2Input is = new Hessian2Input(bis);
MyBean ser = (MyBean) is.readObject(null);

Upon deserialization , I get the following error:

Code:

WARNING: Hessian/Burlap: 'wargames.WarGames__ResinWebBean' is an unknown class in EnvironmentClassLoader[resin-context]:
java.lang.ClassNotFoundException: wargames.WarGames__ResinWebBean in EnvironmentClassLoader[resin-context]

What seems to be happening is that Resin created a proxy for my injected bean (because I have a CDI interceptor registered on it). But the Hessian deserialization code does not seem to be aware of this proxy, throwing the ClassCastException. I get the same exception if I use normal Java Serialization.
Reply With Quote
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0004979)
ferg
01-19-11 17:43

ioc/0e40
 

- Issue History
Date Modified Username Field Change
06-17-10 10:55 ferg New Issue
01-19-11 17:43 ferg Note Added: 0004979
01-19-11 17:43 ferg Assigned To  => ferg
01-19-11 17:43 ferg Status new => closed
01-19-11 17:43 ferg Resolution open => fixed
01-19-11 17:43 ferg Fixed in Version  => 4.0.15


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