Problem executing external exe from Tomcat when running as service

From: Stan (google_at_baysystems.com)
Date: 12/16/03

  • Next message: Shirley: "Project reflection"
    Date: 16 Dec 2003 12:24:00 -0800
    
    

    Hi,

    I have an .exe which I am trying to run from a Servlet under Tomcat
    using Runtime.exe(). The exe reads a file (currently mounted as a
    network drive \\mynetworkedHost\directoryA) and writes a file to a
    directory under Program files which is world writable.

    When Tomcat is started as a user from a cmd shell the process executes
    properly. When Tomcat is running as a service the process fails to run
    without any useful feedback as to why.

    Interestingly when running as a service I can run the command without
    any arguements and it completes with a 0 exit code. It's only when I
    give it args and it needs to process (read a file) and write output
    that the exe fails when run under the tomcat service. This is on
    Windows XP Sp1, java 1.3.1_09 and tomcat 4.1.

    Things do work when the file it is reading is located locally on the
    c: drive.

    This appears to be a windows permissions issue with accessing a
    networked drive. All works well if the Tomcat service is running as
    Administrator and the local Administrator has the same password as the
    remotely mounted file systems Administrator password. So this probably
    isn't a Java/Tomcat specific issue but I thought I'd post this here
    incase anyone else has seen it.

    Thanks.


  • Next message: Shirley: "Project reflection"

    Relevant Pages

    • Re: Cantt download "exe" file because of IIS version
      ... with IIS and can completely alter IIS behavior in arbitrary manners, ... cut out the EXE download and just standardize the installation using your ... As far as I can tell, we are only running Tomcat as an ISAPI application. ...
      (microsoft.public.inetserver.iis)
    • Problem executing external exe from Tomcat when running as service
      ... I have an .exe which I am trying to run from a Servlet under Tomcat ... that the exe fails when run under the tomcat service. ... Administrator and the local Administrator has the same password as the ...
      (comp.lang.java.help)
    • Problem executing external exe from Tomcat when running as service
      ... I have an .exe which I am trying to run from a Servlet under Tomcat ... that the exe fails when run under the tomcat service. ... Administrator and the local Administrator has the same password as the ...
      (comp.lang.java.programmer)
    • Re: Cantt download "exe" file because of IIS version
      ... you are running Tomcat and other ISAPI-based applications on the server? ... Tomcat is supposed to leave static files to IIS to serve ... botches handling the static files (like .exe), it could explain what you are ... that executables were NOT mapped to any application for the MIME type. ...
      (microsoft.public.inetserver.iis)
    • RE: Help with getting tomcat 5.5 working on a redhat es 4 box
      ... Here is a snapshot of the startup of the tomcat service:; ... The information contained in this electronic message is intended for ...
      (RedHat)