tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Rees" <>
Subject RE: java.lang.ClassCastException
Date Thu, 07 Dec 2000 18:39:27 GMT
> A new classloader will be used to load the new servlet. That classloader
> will be used within that servlet, and two different classloaders' versions
> of the same class count as different classes in the JVM. Thus the object
> in the session has the old classloader, whereas the thing trying to use
> it is using the new classloader.
> Just starting a new session each time you upload your servlet should cure
> the problem.

Well, it fixes some of the ClassCastExceptions I see, but not all of them.
In my case, it's an Application level bean which is causing it.  Craig
mentioned that this is a bug that most likely won't be fixed in the 3.X
series of Tomcat, but Tomcat 4.X already behaves properly.


View raw message