Unable to Start Tomcat 7 on windows with the error "%1 is not a valid Win32 application"
Issue:
Tomcat 7 service fails to start as a service in windows environment. The following error is logged in the tomcat logs.
Error:
Running 'Tomcat7' Service...
[Date N Time] [info] [ 6132] Starting service...
[Date N Time] [error] [ 6132] %1 is not a valid Win32 application.
[Date N Time] [error] [ 6132] Failed creating java C:\<PATH>
[Date N Time] [error] [ 6132] %1 is not a valid Win32 application.
[Date N Time] [error] [ 6132] ServiceStart returned 1
[Date N Time] [error] [ 6132] %1 is not a valid Win32 application.
[Date N Time] [info] [ 8084] Run service finished.
Solution:
Main pointer to resolve this type of issues is the JAVA_HOME variable. JAVA in windows is typically installed in two paths. One is the (C:\Program Files (x86)) 32 bit path and the other is 64 bit path (C:\Program Files).
--> Check the JAVA_HOME setting :
Run the following command from the tomcat bin folder :
tomcat7w.exe //ES//tomcat.
This command will launch the UI tool that will let you append the java options.
In case if the jvm.dll is chosen from the 32 bit path and the above error is seen in the logs. Change the jvm.dll path to the java path that is installed in 64 bit.
Issue will be resolved and the tomcat service will be started.
(: Happy Learning :)
0 comments:
Post a Comment