I was asked to resolve the run-time error which was thrown by a Java application (on a Windows server) while trying to send an email.
The application was written a while ago and is working on another Windows server.
The error thrown is: "Error 500: java.lang.NoSuchMethodError:
The whole environment was moved to a new server where that applications failed.
I determined that the application was using the JavaMail package.
I could not located the mail.jar file in the major Java directories (I only located one deep down in one of WebSphere directories).
I also could not recompile the java file that was using JavaMail because it could not find the package.
So I downloaded and installed the latest mail.jar file (JavaMail version 1.4.4) and included the path into the CLASSPATH.
By the way, the CLASSPATH variable was not configured on the server, so the path to JavaMail is now the only path in the CLASSPATH.
Anyway, nothing helped after I recompiled the application. I am still getting the same "NoSuchMethodError" error.
I tried to replace the new mail.jar file by the old one from the older server (where the app worked), then recompiled the app and ran again - same error.