Ran into a issue today.
abc.ClassA a = (abc.ClassA) request.getsession().getAttribute();
and i get classcast exception here.
abc.ClassA
is referenced from a jar file in the project build path.
I also read about the class being loaded with different class loaders and the issue could be becoz of that.