Tomcat 5 and Apache Axis erratic behavior

R

Rushman

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:

/** 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.
 
T

Thomas Weidenfeller

Rushman said:
Please folks, enlighten me!

My crystal ball tells me ...
oh wait, lots of clouds ...
green smoke ...
now I see clearer ...
diff or cmd program is
.... clouds ...
not in the path when run from ...
.... big dark clouds ...
red smoke ...
ah, and you happen to ignore possible exceptions ...


That's all for today. Thanks for visiting. If you need more, come back
tomorrow with some real code. This way out. NEXT ONE PLEASE! Don't push!

/Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top