We have an Java web application that is installed on a Windows environment. We use Advanced Installer, a commercial product, to build the MSI. The installer installs Tomcat 7, Apache 2.0 and deploys our application code.

During an upgrade the tomcat files are updated and tomcat service is reinstalled. We get a note saying that not all files could be installed so a restart is necessary after the install.

If we ignore the restart prompt, everything works flawlessly. But, once the computer is restarted, Java no longer works and the Apache Tomcat Windows service does not start. Even running "java" or "java -version" in the JRE bin directory results in the following error:

C:\Program Files\Java\jre6\bin>java -version Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object

Our installer isn't modifying any of the Java files, just the installed tomcat files. So, i'm puzzeled as to what could be causing Java to stop working.

The only known work around is to completely re-install Java and then restart the Tomcat service. Does anyone know what would cause the Java JRE to be corrupted and only fail after the computer is restarted? We have recreated this problem on both 32 and 64 bit OSes including Windows XP, Windows Server 2003 and Windows Server 2008 R2.

  • 2
    How about contacting the company behind Advanced Installer. You bought it and you get support from them. Hopefully.
    – mailq
    Aug 8, 2011 at 20:30
  • Do you have an installer step that manipulates the CLASSPATH enviromental variable
    – Zypher
    Aug 8, 2011 at 20:57
  • No we do not edit the CLASSPATH variable
    – gelgamil
    Aug 8, 2011 at 21:11

3 Answers 3


Your installer may be trying to overwrite the JRE files. Do a comparison of the JAVA registry entries and system path settings between a good system and a corrupted system. My guess is the registry entries have been overwritten.

  • Used BeyondCompare 3 Pro (highly recommended btw) to compare registry keys before and after the upgrade on a Windows Server 2008 machine. After the upgrade there appears to be a suspicious key under HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\SessionManager named "PendingFileRenameOperations" that is not present in the pre-upgrade registry. Values include Java JRE files like jce.jar, jsse.jar resources.jar, rt.jar, dnsns.jar and others. Not sure why these would be changed or if this is the cause of the problem. If I compare the Java dirs they are virtually the same.
    – gelgamil
    Aug 8, 2011 at 23:19

The following post mentions the same thing we had happen which is that the Java Updater can corrupt Java if it tries updating when services are running using Java:

Tomcat 7.0.22 Windows service breaks with JRE update

I wonder if you had a Java update run after Tomcat was installed which then causes this issue.


You need to audit your installer, go over every single thing that it changes and verify that:

  • it needs to perform that change
  • that change doesn't break anything else

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .