TOMCAT 5.5.17 Installation on Windows XP - J2SE 1.4 (JRE 1.4) Compatibility Issue ! Another free web tool that I recently acquired was the Apache Tomcat 5.5.17 web server (Tomcat has been developed under the Jakarta project of the Apache Software Foundation). The installation of Tomcat 5.5.17 on Windows XP was quite straight forward, However, I uncovered an unexpected issue with the additional configuration that Tomcat 5.5.17 installation requires, to make it compatible with JRE 1.4. (or earlier JRE versions). BACKGROUND TO THE INSTALLATION ISSUE Tomcat 5.5.17, it should be explained, is designed to be used with J2SE 5.0 (JRE 5.0) or later. My PC has J2SE 1.4 (JRE 1.4) installed on it, and having only recently got it to work sensibly as a development environment for my own modest Java needs, I was reluctant to upgrade it to J2SE 5.0. I therefore decided to use Tomcat 5.5.17 together with the "J2SE 1.4 Compatibility" package ("compat.zip") provided by Apache for JRE 1.4 users. INSTALLATION OF TOMCAT 5.5.17 WITH JRE 1.4 For the installation of the base Tomcat 5.5.17 version on Windows XP, the user has a choice of two different packages: one is a ".zip" package (which simply requires "unzipping") and the other is the ".exe" package (which uses the Windows Installation Wizard). I chose to use the latter as the ".zip" package, at first glance, looked as if it might require more effort than merely "unzipping" its contents. It contained, for example, both ".bat" files for Windows and ".sh" files for Unix platforms. On the other hand, the ".exe" package was undoubtedly simpler, relying as it did on the well familiar Installation Wizard. The installation approach in principle was therefore straight forward: (a) Use the ".exe" package to install Tomcat 5.5.17 with the Installation Wizard (b) Unzip the contents of the "compat.zip" package (into the Tomcat home directory) to make Tomcat 5.5.17 compatible with JRE 1.4 Alas, as is often the case in engineering practice, this seemingly trivial exercise in software installation, did not prove as simple as it seemed at first glance. TOMCAT START-UP ERROR IN JRE 1.4 The installation of Tomcat 5.5.17 using the Installation Wizard posed no problems. It completed successfully and installed Tomcat as a Windows service. However, the additional installation of the "JRE 1.4 compatibility" package, did not appear to have the desired effect: the Tomcat service could not be started, - clearly the service remained incompatible with JRE 1.4 despite the application of the compatibility package. CAUSE OF TOMCAT START-UP ERROR On closer examination, it became obvious that "JRE 1.4 Compatibility" add-on was really designed to be used with the Tomcat 5.5.17 ".zip" base installation package, - rather than the ".exe" Windows Installation Wizard that I had chosen. The crucial issue here was the PATH for the Tomcat Home directory (also referred to as "CATALINA_HOME" in Tomcat documentation) The "JRE 1.4 Compatibility" (compat.zip) package expects the Tomcat Home directory to have the path "C:\Program Files\Apache Software Foundation\apache-tomcat-5.5.17", into which the compatibility package then installs the "jmx.jar", the "xercesImpl.jar" and the "xml-apis.jar" files (in the appropriate sub-directories under the Tomcat Home directory, i.e. the "bin" sub-directory for jmx.jar and "common\endorsed" sub-directory for the others). Had I used the ".zip" (rather than the ".exe" package) for the base installation of Tomcat 5.5.17, I would have had precisely the above path as my Tomcat Home directory, i.e.: "C:\Program Files\Apache Software Foundation\apache-tomcat-5.5.17" However, using the ".exe" package as I did, the Tomcat Home directory was set up as: "C:\Program Files\Apache Software Foundation\Tomcat 5.5". Unpacking the compatibility package in this home directory had consequently resulted in the relevant jar files being installed in the wrong sub-directories, - hence the Tomcat service start-up problems. (Unpacking the compatibility package in this home directory erroneously created a lower level "....\apache-tomcat-5.5.17" directory with its own "bin" and "common/endorsed" sub-directories, - which were entirely the wrong locations for the compatibility jar files. Hence the Tomcat service start-up problems). REMEDY The remedy, as it turned out, was quite simple. Although the Tomcat Home directory set up by the ".exe" package had a different path, the sub-directory structure below the home directory was identical to that associated with the compatibility package. All that was required therefore, was to copy the three ".jar" files created by the compatibility package from the "....\apache-tomcat-5.5.17" directory, to their corresponding sub-directories under the "....\Tomcat 5.5" directory. Thus the steps required were: (1) copy "apache-tomcat-5.5.17\bin\jmx.jar" to "Tomcat 5.5\bin\jmx.jar" (2) copy "apache-tomcat-5.5.17\common\endorsed\xercesImpl.jar" to "Tomcat 5.5\common\endorsed\xercesImpl.jar" (3) copy "apache-tomcat-5.5.17\common\endorsed\xml-apis.jar" to "Tomcat 5.5\common\endorsed\xml-apis.jar". I am not sure whether the above quirk of Tomcat installation is well known, - it certainly wasn't obvious to me from the documentation provided (I haven't to-date checked in the Apache FAQ database). Return to Main Page

Document created by Neil Keskar (nkeskar@hotmail.com) 17/9/08