问题
I'm having an intermittent error with a legacy production app. On some boxes, certain features will break somewhat randomly. In the logs, i get a ClassNotFound exception.
However, the class is there, in WEB-INF/classes and the rest of the app is loading properly (this is not loaded with reflection/forName/etc, its just a standard java class).
The boxes are configured identially, but this does not happen on every box. Restarting the app will work, but its a large cluster, and pretty irritating to have to track down one misbehaving box.
I've had a similar issue recently with a staging box, but it was not picking up jars in the WEB-INF/lib folder.
It seems like its some kind of configuration issue, but I've poured over every file I could find, and can't find anything that would seemingly effect this.
So, anyone know what can cause this? What can make an application lose a class that is in the same location as the rest of the app that is running properly? Its pretty hard to google for the solution, because just about every question about tomcat and ClassNotFound is people having trouble with a tutorial, or just getting the basic build running or configuring their IDE. This is a different problem, so please don't suggest those fixes.
来源:https://stackoverflow.com/questions/8190939/tomcat-6-losing-classes-in-production