Some java web applications have compatibility issues with the Tomcat 5 server shipped with CentOS 5.
The first troubleshooting step is to install the official Oracle Java JDK package. Once the JDK is installed, edit your system-wide environment variable “JAVA_HOME” to point to the new package. Your “/etc/profile” file should have the following lines at the bottom (substitute your correct JDK install path):
JAVA_HOME="/usr/lib/jvm/java-x.x.x-sun-x.x.x.x" export JAVA_HOME
I have seen problems with the built-in javax.mail (javamail) breaking web app email capabilities. If this is happening, remove the symbolic link at /var/lib/tomcat5/common/lib/[javamail].jar – this points to the system-provided jar from classpathx-mail package. This will need to be repeated every time the classpathx-mail or tomcat5 packages receive updates. Unfortunately there is no safe way to uninstall classpathx-mail because the tomcat5 package has a dependency that forces both to be removed. If you install tomcat by hand without the system package, you can control every dependency, but it will not be receiving automatic security updates. For changes to take effect, restart tomcat with the following command:
- service tomcat5 restart
This is an ugly workaround for old software versions distributed with CentOS 5. The real solution is to move to a newer version of the OS – install CentOS 6 and your Java and Tomcat packages will be much newer (better compatibility with many web apps). Good luck!