<p>We have hosted our web applications on Tomcat 6.0.18 and experienced the following problem:</p>

<p>There are two web apps WebApp1 and WebApp2, both are same system but of different versions. </p>

<p>Now the problem is when the tomcat has been running for a week or longer time then sometimes system gives NoClassDefFoundError ! also we got some strange issue where the Class Loader of WebApp1 has loaded the class present in the jar of WebApp2 ! The same jar is also present in WebApp1 but the versions are different.</p>

<p>When we restarted the Tomcat everything started working fine ! Our JRE is 1.5.10</p>

<p>Please let me know if you have encountered such issues. </p>

<p>Regards,
Jatan Porecha</p>

I've encountered many, many flavors of classloader weirdness with Tomcat - even if you don't perform any classloader code yourself, it's very easy for Tomcat itself to produce problems. The most common problem appears to be repeatedly unloading and reloading a webapp leaks classloaders and eventually runs Tomcat out of memory.
The most common reason I've seen for version mismatches is that Tomcat makes sure some classes and jars (part of Tomcat itself) are ahead of any others in your webapp classpath - commons-logging seems to be the most common example - and it's possible for classloaders to be loaded, unloaded, or kept around when you wouldn't expect.
Can you provide a few more details - if the jar is from a third-party there is a good chance someone has seen the issue before. If it's your own jar, then do you have any of your own classloader code in the application?