King Notes Download JDK
If you ever see these types of messages from the command line, there maybe a possibility of JDK being corrupted.
As you can see, running commands like "zmhostname" and/or "zmlocalconfig" will produce the "NoClassDefFoundError" error.
zmhostname Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object /opt/zimbra/bin/zmlocalconfig -q -m export Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object
To download JDK:
1) Go to http://java.sun.com/products/archive/
2) Pick "JDK/JRE - 5.0" then "5.0 Update 17", then click "Go"
3) On the next page click on the link that displays "Download JDK"
4) On the next page select your platform, select multi-language, and click on the "I agree" license
There's only two options for Linux:
32 Bit jdk-1_5_0_17-linux-i586.bin 64 Bit jdk-1_5_0_17-linux-amd64.bin
5) Once you have downloaded the *.bin file, transfer it to the Zimbra machine in the /tmp directory.
To install JDK:
(using jdk-1_5_0_17-linux-i586.bin as an example)
1) zmcontrol stop **run as zimbra**
2) mv /opt/zimbra/jdk1.5.0_17 /opt/zimbra/jdk1.5.0_17.OLD **run as root**
3) chown 755 /tmp/jdk-1_5_0_17-linux-i586.bin **run as root**
4) cd /opt/zimbra **run as root**
Note:This will basically extract JDK into the /opt/zimbra. IIRC, there is EULA where you'll have to use the space bar to get to the bottom of the EULA to indicate yes or no.
6) chown -R zimbra:zimbra jdk1.5.0_17
7) Test again with the zmhostname or zmlocalconfig commands.
8) zmcontrol start **run as zimbra**
My rationale for this page was that it took me a long time to figure out where to download the proper JDK file. Hopefully this will help those who are in need of installing JDK for linux, and are not quite savvy with Sun's website.
There are certain conditions where Zimbra might recommend JDK 6, as it has particularly good debugging efficiency and tools.
However, Zimbra must request and recommend that production sites use the currently-distributed/included JDK 1.5u17 under normal conditions. A known reason is due to this JDK bug:
Special thanks to Thom O'Connor for the pointers!