|
I upgraded to 3.0.0 release and I'm still
getting the
ClassCastException after hot
redeploy.
Filed as bug
563120
When CMP deserializes an Object from a
persistent field
mapped to BLOB what ClassLoader is used.
Or is there
some Class ident stored when an object is
serialized. The
JDK docs for ObjectInputStream seem to imply
that maybe
the serial version id of the object affects
which Class is
created to deserialize the
object.
So when I do a hot redeploy in JBoss is the VM
caching the
original Class object then I'm trying to cast
to an interface
loaded from a different
ClassLoader?
Should be possible to create a custom
ObjectInputStream
to control which ClassLoader is used and how
the Class
is resolved from the input stream.
A quick grep in the
JBoss source and it looks like
JDBCUtil.convertByteArrayToObject()
is where the deserialization is done. I
could derive an
ObjectInputStream that used a JBoss class
loader instead
of the "standard mechanisms". Might that
fix the problem?
Where would I get a reference to the right
JBoss class loader?
JD
-----Original Message-----
From: Scott M Stark [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 12:41 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] ClassCastException from serialize, redploy, deserialize The problem is probably the same one we saw when
binding and then
rebinding ejb home
proxies into JNDI using java.rmi.MarshalledObjects.
The issue is that
there was some caching being done at the vm layer based
on identity of the
class loader. Try your testcase with the new 3.0.0 release
which changed how class loaders computed equality
and hashCode
and if there is still a problem open a
bug.
xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark Chief Technology Officer JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx
|
Title: ClassCastException from serialize, redploy, deserialize
- [JBoss-user] ClassCastException from serialize, redploy, des... JD Brennan
- Re: [JBoss-user] ClassCastException from serialize, red... Chris Chen
- Re: [JBoss-user] ClassCastException from serialize, red... Scott M Stark
- RE: [JBoss-user] ClassCastException from serialize, red... JD Brennan
- JD Brennan
