That's a good idea about trying a modified version of commons-lang. However, I am not 
sure what they will be able to do about it since they are using ObjectInputStream to 
do the serialization, and that is Sun's code. Either way, I will see if there is a 
workaround.

On the other hand -- why is OJB using this method to do what looks like is a simple 
clone routine? If commons-lang method is known to be non-complaint with J2EE 
(especially JBoss) classloading, wouldn't OJB want to change the way it clones those 
descriptors?

-Andrew


-----Original Message-----
From: Thomas Dudziak [mailto:[EMAIL PROTECTED]
Sent: Fri 8/13/2004 6:34 PM
To: OJB Users List
Subject: Re: Jboss and ClassCastException (MetadataManager and 
JdbcConnectionDescriptor) -- anyone else have it?
 
Clute, Andrew wrote:

> I am wondering if it has something to do with the fact that
> SerilizationUtils uses ObjectInputStream to serialize/desearlize the
> objects, and ObjectInputStream on the deserialization does a
> Class.forName() to create the new object -- which in the J2EE
> classloader world can cause problems. I think that would explain why it
> would use the previous versions. I am posting a message to the Jboss
> group to see if my hypothesis is correct.

Hope you don't mind if I hop in :-)
A couple of weeks ago we unified class and resource loading in OJB into 
the ClassHelper class, which per default uses the class loader of the 
current thread. So perhaps the problem here is that the 
SerializationUtils class does not use this class loader (it is known to 
happen that the classloader that class.forName uses is not the same as 
the one of the current thread, e.g. when writing Ant tasks).
However in OJB we cannot change this, so perhaps you could create a 
modified version of commons-lang to verify this, and if this is true, 
then you probably should file a feature request with the commons-lang 
folks ?

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to