I am not an expert.
Every call has some kind of static class ID for the versioning. When you
compile a class, it increments. So you have your jsp/servlet compiled
as one class id (you have reference from servlet/jsp to bean) , if you
recompile your bean, then it is going to increment class id and you do
have versioning mismatch. I have seen this happens on RMI.
anil.
Leon Palermo wrote:
> Mahesh and others, After performing the test myself and looking at
> things, I found out that indeed the dispatch servlet is putting the
> bean in correctly and the jsps are utilizing them properly. The
> problem occurs only after I compile any file used by the Bean.
> Although the Bean isn't compiled itself (the .class file remains the
> same); the compilation of a class imported by the bean causes the
> ClassCastException. Only after restarting tomcat do things function
> properly until the next compilation of the file used by the Bean. As a
> result, I transfer the focus of this problem away from the jsp realm
> to the Java language realm. Does anyone have any idea why the
> compilation of imported classes would cause a ClassCastException as
> previously described? Thanks again!