I have taking an existing, old, Java code base and changed one class. I have recompiled the code base in Java 1.5.0. I then successfully deploy this code on Tomcat.
To test my deployment, I send a message to my application and I hit an error with the class that I changed.
Error loading class [com.MyClass] for bean with name 'myClass' defined in ServletContext resource [/WEB-INF/ApplicationContext.xml]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: (com/MyClass) bad major version at offset=6
I have checked the deployed Ear and War's manifest files and both have 1.5.0_22-b03. The version on the Tomcat instance is 1.5.0.
Can anyone tell me why I'm getting this error? The JDK running the application is the same version that the code was compiled on.
Strangely, the only class that has the error is the class I amended.