Hello @ all!
I'm completely flabbergasted! I wrote a simple web service using the JWS technique on Axis (simple java application which
extension have been changed to ".jws" and then dropped in the Axis webapp directory under Tomcat). Now, let the fun part
begin...
I wrote two client apps for my web service(one in Java, one in an obscure scripting language...).
I started Tomcat 5 from the cmd prompt (TOMCAT_HOME/bin/tomcat5.exe). Both of my client apps returned with the expected
results. This is great! But...
I restarted Tomcat with Procrun Service Manager Version 1.0.0.0 this time. Guess what? None of my two clients returned with
the expected results!
After a little investigation, I realized that a file output in the java.io.tmpdir wasn't being written when I run Tomcat from
Procrun... here's a snippet of my code:
Code:
/** begin snippet **/
String[] cmd = { "cmd",
" /c",
"diff",
"-Bwy",
"-W1",
originalFilePath,
modifiedFilePath,
">",
diffOutputPath)
};
Process process = Runtime.getRuntime().exec(cmd);
InputStream ierr = process.getErrorStream();
InputStream iin = process.getInputStream();
while (ierr.available() > 0) {
ierr.read();
}
while (iin.available() > 0) {
iin.read();
}
int exitVal = process.waitFor();
//BLABLABLA...
/** end snippet **/
As you can see, I'm trying to redirect the output from "DIFF" to a new file (which will be stored in the temp dir).
Soooooo...
My question boils down to this:
"WHY DOES THIS WORK WHEN I START TOMCAT FROM THE COMMAND LINE AND IT DOESN'T WHEN I START THE SERVER WITH PROCRUN???"
or, if I simplify again:
"WHY ME? WHY?"
Please folks, enlighten me!
Rushman
p.s. The winner of this contest will be granted eternal admiration from my part.
Dijkstra's law on Programming and Inertia:
If you don't know what your program is supposed to do, don't try to write it.