Ubuntu 7.10 (Gutsy Gibbon) was released on Oct 18, 2007, and like most administrators I decided to take advantage of the release and upgraded my current system 7.04 (Feisty Fawn). Overall, the upgrade went well and I didn’t run into any trouble during the upgrade process. However, afterwards I found some side effect on the my web applications running on Tomcat:
- Log4j was no longer logging anything into the log files.
- I was getting the following exception in the catalina.log file when attempting to dynamically render an image with a java servlet.
java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/i386/libawt.so: Can't load IA 32-bit .so on a IA 32-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:993)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1509)
at java.awt.Toolkit.<clinit>(Toolkit.java:1530)
at java.awt.Font.<clinit>(Font.java:141)
....
It turned out that the Java JVM was upgraded to 1.5.0_13-b05 which contained several bugs. Not knowing of anyway to downgrade my JVM to it’s preivous version, I decided to install Java 6 and use it as the JVM for Tomcat.
To install Java 6 for Ubuntu:
$ apt-get install sun-java6-jdk
To configuring Tomcat to run on the Java 6 JVM:
$ nano /etc/default/tomcat5.5
Uncomment or add the following line:
JAVA_HOME=/usr/lib/jvm/java-6-sun
Restart the Tomcat server:
$ /etc/init.d/tomcat5.5 restart
Afterwards, everything was running back to normal!
Related posts: