This is because your class files were compiled with a Java compiler not compatible with JVM in use within tomcat. If you compiled on the same machine on which you have tomcat running, you must be having 2 JDKs (or a JDK and another JRE) with different versions. Solution to this is:
1. Find tomcat bin folder and openin it (on my machine it is /usr/share/tomcat6/bin). You can also search for directly (find / -name ).
2. Add correct JAVA_HOME to it and then restart tomcat (add it after all initial comments statements end)
On windows, you can make the same change inand it should work.