Tomcat 5 and Apache Axis erratic behavior

Discussion in 'Java' started by Rushman, Apr 27, 2005.

  1. Rushman

    Rushman Guest

    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.
     
    Rushman, Apr 27, 2005
    #1
    1. Advertising

  2. Rushman wrote:
    > 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
     
    Thomas Weidenfeller, Apr 27, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joey Vendetta
    Replies:
    0
    Views:
    3,469
    Joey Vendetta
    Apr 1, 2004
  2. Replies:
    0
    Views:
    952
  3. hocho888
    Replies:
    1
    Views:
    661
  4. Hugo Gonz?lez

    Tix Meter, erratic behavior

    Hugo Gonz?lez, Sep 11, 2004, in forum: Python
    Replies:
    1
    Views:
    341
    klappnase
    Sep 12, 2004
  5. Mike Copeland
    Replies:
    2
    Views:
    97
Loading...

Share This Page