 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Rushman Guest
|
Posted: Wed Apr 27, 2005 1:52 pm Post subject: Tomcat 5 and Apache Axis erratic behavior |
|
|
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.
|
|
| Back to top |
|
 |
Thomas Weidenfeller Guest
|
Posted: Wed Apr 27, 2005 3:38 pm Post subject: Re: Tomcat 5 and Apache Axis erratic behavior |
|
|
Rushman wrote:
| Quote: | 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
--
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|