Hi.
In our java webapp (jfdk 1.4.2 and Tomcat 4 on an Windows 2003 Server)
we have a class, which calls an externel programm as a OS process. But
the exit code is 128. Always !!! If we execute the command in die
Windows Command Line directly, everythink works fine.
The Tomcat runs as a service. Even if we create just a simple jsp page
with the following code:
<%
java.lang.Process dirProc =
java.lang.Runtime.getRuntime().exec("cmd /c Dir * > c:\
\dir_test.txt");
dirProc.waitFor();
out.write("" + dirProc.exitValue());
%>
we get 128 as exit code !!! and no file c:\dir_test.txt is created.
Can anyone help??? PLEASE!
Thanks
Thomas Konrath
tkonrath - 14 May 2007 16:16 GMT
Finally we solved the problem:
our Tomcat-Server runs as a service under Windows. Several other calls
of the external programm have just running of an timeout, but the
processes still exsists on the server. So after killing all hanging
processes through the task manager, everythink works fine.
It seem, that this return value is like the error message "Maximum
number of opend processes reached."
Thx,
Thomas