tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonard Bouchet <...@lajoiedelire.ch>
Subject Re: classformaterror - help
Date Wed, 20 Sep 2000 10:43:52 GMT

thank you for your answer.

I'm using Sun JVM 1.0. I tried to call System.gc() from a jsp page, but it
doesn't change anything. Even if I restart, I have the problem.

How can I be sure that a class has been deleted, before I try to reload it?


> I don't think it has anything to do with the ResultSet thing. I'm
> doing something completely different and get the same sort of errors.
> 
> ClassFormatExceptions occur as a result of a Class's bytecode getting
> corrupted, e.g. because the file is damaged on your disk. They are not
> supposed to happen "just like that".
> 
> I recently posted a message describing a similar problem, observed
> while I was gradually but frequently improving on my code. I now think
> it's Tomcat's ClassLoader that's the problem. Or, to be more specific,
> Java's class loading mechanism that does not allow re-definition of a
> class. You cannot just dispose of a class in a running VM and load a
> new definition. You can, however, rely on the VM's garbage collector
> cleaning up a class when it is no longer used. Which is exactly what
> Tomcat's AdaptiveClassLoader does, as the comments in the sourcecode
> mention. So, my guess is that, when your VM's garbage collector does
> not clean up a class fast enough, you get ClassFormatExceptions when
> you try to load a new definition from disk. What VM are you using ?


Mime
View raw message