[jboss-user] [JBossCache] - Re: ClassCastException/instanceof fails when getting object

jorgemoralespou_2 do-not-reply at jboss.com
Wed Oct 10 05:16:29 EDT 2007


I have encountered such a problem before, and mine was due to an Object being moved from one jar to another. While the object is in the same package, same serialVersionUID, classloader is different, and as far as I know, real class identifies by it`s classloader, package, class file, serialVersionUID. So if different classloaders load the class, in reality it is a different class, and you get a ClassCastException.

We`ve been having hard times updating a running application that have objects in cache that have to be updated. For this we have done a real freaky solution. 

It`s real hard to update object model of an application running clustered, so good luck.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093363#4093363

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093363



More information about the jboss-user mailing list