Tomcat Windows Service fails after Java Upgrade with CA Web Viewer 12.1

book

Article ID: 40191

calendar_today

Updated On:

Products

CA 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.

 

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 that change.

Environment

Java
Apache Tomcat
MS Windows Server

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 other versions
  4. Edit catalina.bat in directory C:\Program Files\CA\CA_OM_Web_Viewer\apache-tomcat-8.5.32\bin   (for example)

    Change this line:   set "JRE_HOME=C:\Program Files\Java\jre1.8.0_191"
    to specify the updated java version set "JDK_HOME=C:\Program Files\Java\jre1.8.0_281"
    and the JAVA_HOME variable if specified.

  5.  In the administrative command prompt, cd to C:\Program Files\CA\CA_OM_Web_Viewer\apache-tomcat-8.5.32\bin   (for example)
  6. run service.bat remove 
    run service.bat install
  7. Start the Apache Tomcat Windows service  (see Additional Information below for Details if needed)
  8. Run tomcat8w //ES//Tomcat8forCAOMWebViewer12 and click on the Java tab to correct the Java virtual machine path if needed and the heap size
  9. Recycle Tomcat

Additional Information

Please see Error #2 trying to start Apache Tomcat as a service with CA Output Management Web Viewer for Windows for exact instructions on how to uninstall and reinstall Tomcat as a service.