Tomcat Windows Service fails after Java Upgrade with service-specific error code 1 Web Viewer 12.1
search cancel

Tomcat Windows Service fails after Java Upgrade with service-specific error code 1 Web Viewer 12.1

book

Article ID: 40191

calendar_today

Updated On: 09-19-2024

Products

Output Management Web Viewer

Issue/Introduction

After a Java upgrade, Tomcat service does not start and the System event log shows service-specific error code 1.
NOTE: Tomcat is running as a service.

 

Environment

  • Java
  • Apache Tomcat®
  • MS Windows Server
  • Output Management Web Viewer 12.1 for Windows

Cause

After the Java upgrade, the catalina.bat file was not set to the correct Java version and the Tomcat service needed to be uninstalled and reinstalled to pick up the new Java environmental variables.

Resolution

    1. Stop the Tomcat service
    2. Install the new Java
    3. After the install of the new Java, verify that the Windows System environment variables are set for the new Java.
      NOTE: The JDK is required for Tomcat 9 and can be used with earlier versions
    4. Edit catalina.bat in directory C:\Program Files\CA\CA_OM_Web_Viewer\apache-tomcat-9.0.91\bin   (for example)
    5. Change this line:
      JRE_HOME=C:\Program Files\Java\jre1.8.0_191

      to
    JRE_HOME=C:\Program Files\Java\jre1.8.0_281   (example for Oracle)
    JRE_HOME=C:\Program Files\Eclipse Adoptium\jdk-11.0.14.101-hotspot (example for ADOPTIUM)
    1. In the administrative command prompt, cd to C:\Program Files\CA\CA_OM_Web_Viewer\apache-tomcat-9.0.91\bin   (for example)
    2. Run service.bat remove 
    3. Run service.bat install
    4. Start the Apache Tomcat Windows service  (see Additional Information below for Details if needed)
    5. Important: Run tomcat9w //ES//Tomcat9 in the administrator command prompt and
      - Click on the Java tab to insert the Java virtual machine path
      - Check that the heap size is what it was before the Java upgrade
      - Check on the Log On tab that you have logon as Local System account
    6. Recycle Tomcat

Additional Information

See Error 2 Starting Apache Tomcat as a Service OM Web Viewer for exact instructions on how to uninstall and reinstall Tomcat as a service.

*If running Tomcat 8, use

  • Run tomcat8w //ES//Tomcat8forCAOMWebViewer12