Unable to start Tomcat service
Issue:
When starting the AE-Tomcat services on the AE server we get the below error:
Also when we check the log in Event viewer in windows, we get the error as :
The Apache Tomcat XX TomcatXX service terminated with the following service-specific error: Incorrect function.
How to Reproduce:
Uninstall JDK installed on your machine to reproduce the issue.
Resolution:
This error occurs when JDK on your machine is not installed.
To resolve this:
- Check the java version installed on the machine. Perform java -version on cmd to check
- Check the JAVA_HOME and JRE_HOME environment variable are pointing to the correct path or not
- Install JDK of the same version as JRE if not installed
- Double click on the tomcat9w.exe file from apache-tomcat/bin location
- Click on the JAVA tab and Check the Use Default option for the Java Virtual Machine option.
- Now start the tomcat service