Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat server is not starting as service: %1 is not a valid Win32 application

My tomcat server is working fine in Eclipse but when I try to start the server it is not starting.

Here are the errors:

[2012-08-15 09:26:09] [info] Procrun (2.0.5.0) started
[2012-08-15 09:26:09] [info] Running Service...
[2012-08-15 09:26:09] [info] Starting service...
[2012-08-15 09:26:09] [197  javajni.c] [error] %1 is not a valid Win32 application.
[2012-08-15 09:26:09] [994  prunsrv.c] [error] Failed creating java C:\java\java\jre\bin\server\jvm.dll
[2012-08-15 09:26:09] [1269 prunsrv.c] [error] ServiceStart returned 1
[2012-08-15 09:26:09] [info] Run service finished.
[2012-08-15 09:26:09] [info] Procrun finished.
[2012-08-15 09:29:06] [info] Procrun (2.0.5.0) started
[2012-08-15 09:29:06] [info] Running Service...
[2012-08-15 09:29:06] [info] Starting service...
[2012-08-15 09:29:06] [197  javajni.c] [error] %1 is not a valid Win32 application.
[2012-08-15 09:29:06] [994  prunsrv.c] [error] Failed creating java C:\java\java\jre\bin\server\jvm.dll
[2012-08-15 09:29:06] [1269 prunsrv.c] [error] ServiceStart returned 1
[2012-08-15 09:29:06] [info] Run service finished.
[2012-08-15 09:29:06] [info] Procrun finished.
[2012-08-15 09:30:07] [info] Procrun (2.0.5.0) started
[2012-08-15 09:30:07] [info] Running Service...
[2012-08-15 09:30:07] [info] Starting service...
[2012-08-15 09:30:07] [197  javajni.c] [error] %1 is not a valid Win32 application.
[2012-08-15 09:30:07] [994  prunsrv.c] [error] Failed creating java C:\java\java\jre\bin\server\jvm.dll
[2012-08-15 09:30:07] [1269 prunsrv.c] [error] ServiceStart returned 1
[2012-08-15 09:30:07] [info] Run service finished.
[2012-08-15 09:30:07] [info] Procrun finished.
[2012-08-15 09:30:57] [info] Procrun (2.0.5.0) started
[2012-08-15 09:30:57] [info] Running Service...
[2012-08-15 09:30:57] [info] Starting service...
[2012-08-15 09:30:57] [197  javajni.c] [error] %1 is not a valid Win32 application.
[2012-08-15 09:30:57] [994  prunsrv.c] [error] Failed creating java C:\java\java\jre\bin\server\jvm.dll
[2012-08-15 09:30:57] [1269 prunsrv.c] [error] ServiceStart returned 1
[2012-08-15 09:30:57] [info] Run service finished.
[2012-08-15 09:30:57] [info] Procrun finished.

What does these errors mean and how do I fix them?

like image 907
Siva Kumar Reddy G Avatar asked Aug 15 '12 04:08

Siva Kumar Reddy G


People also ask

How do I fix Error 193 1 is not a valid Win32 application?

Resolving The Problem This issue can occur if a file or folder with name 'Program' exists on the same drive where the Cognos products are installed.To resolve this, either rename the file/folder or delete it. Confirm that the path to ppserver.exe is correct.

What is% 1 is not a Valid Win32 application?

Resolution to %1 is not a valid Win32 application The error %1 is not a valid Win32 application generally occurs due to a rogue file named “C:\Program” that exists on the WSUS server. This file seems to cause issues related to the WSUS certificate being properly detected and imported.

Is not a valid Win32 application Java?

In most cases, the “1 is not a valid Win32 application” occurs due to the incompatibility between the Windows version/type and program. Please make sure you have downloaded the right version of the installer file. Press Windows key + R to call out the Run box.


2 Answers

I had the exact same problem and it was caused by running a 32 bits Tomcat on a 64 bits windows. (I was using XAMPP 1.8.3 in a Windows 8 64 bits.)

First:

  • Make sure you have JAVA_HOME system variable pointing to your jdk folder (not the \bin);
  • Make sure %JAVA_HOME%\bin; is in your %PATH% system variable.

The solution:

  • Uninstall the Tomcat7 service if you have installed it already;
  • Download a 64 bit version of Tomcat 7 for windows (check this link to get the latest - I used the 7.0.42 version);
  • Replace the tomcat7.exe and tomcat7w.exe files of the C:\xampp\tomcat\bin folder with those present in the recently downloaded zip file.

Now you can install the service as usual (through XAMPP control panel, if you use it) and it should start just fine.

like image 160
acdcjunior Avatar answered Oct 16 '22 06:10

acdcjunior


Make sure the path of 'jvm.dll' (tab 'Java' when starting tomcat8w.exe) locates the right Java Runtime Environment version (x64 or x86).

This problem occurs in both cases below :

1 - Your Tomcat server version is 64-bit but using a 32-bit version of the Java Virtual Machine.
2 - Your Tomcat server version is 32-bit but using a 64-bit version of the Java Virtual Machine.

like image 32
Etienne Tonnelier Avatar answered Oct 16 '22 06:10

Etienne Tonnelier