Re: Executing binary from Servlet

2006-09-13 Thread William Bonnet
Hi > Tomcat is started using the startup.sh script provided and it runs using > a specific tomcat account which has admin type rights. > I am beginning to wonder what sort of problem this may be, as I must > emphasise that: > The runtime.exec() DOES work sometimes, and not others. There does not >

Re: Executing binary from Servlet

2006-09-13 Thread Sriram Narayanan
On 9/12/06, Mark HB <[EMAIL PROTECTED]> wrote: I have ensured that the permissions are set to at least 755 and am now at a bit of a loss. Any ideas? I'd faced a similar problem yesterday when adding some features to Sahi (http://sahi.sourceforge.net/). But this was on Windows. I took the syst

Re: Executing binary from Servlet

2006-09-13 Thread Sameer Acharya
>From your directory path mentioned it looks like this is a work folder /srv/www/tomcat5/base/webapps/simulator/WORK/yqzatmopa343/cimmsim: Is it possible that your dir/file is not available at some point in time when servlet is executing ? Have you tried executing a process from some fixed direc

Re: Executing binary from Servlet

2006-09-13 Thread Mark HB
Tomcat is started using the startup.sh script provided and it runs using a specific tomcat account which has admin type rights. I am beginning to wonder what sort of problem this may be, as I must emphasise that: The runtime.exec() DOES work sometimes, and not others. There does not seem to be a

Re: Executing binary from Servlet

2006-09-12 Thread Sameer Acharya
Doesent look like a SecurityManager issue cos that would have resulted in a SecurityException. Just glanced thru the exec api doc and found this Starting an operating system process is highly system-dependent. Among the many things that can go wrong are: The operating system program file was

Re: Executing binary from Servlet

2006-09-12 Thread Martin Gainty
ginal message without making a copy. Thank you. - Original Message - From: "Santosh Puranshettiwar" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Tuesday, September 12, 2006 8:56 AM Subject: Re: Executing binary from Servlet > >Specifically its bee

Re: Executing binary from Servlet

2006-09-12 Thread Santosh Puranshettiwar
OTECTED]> To: "Tomcat Users List" Sent: Tuesday, September 12, 2006 8:27 AM Subject: Re: Executing binary from Servlet HI, It all runs fine as a standalone, and when I print the command that I am running using exec to the screen and then run it myself, it works fine. I had t

Re: Executing binary from Servlet

2006-09-12 Thread Martin Gainty
one or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Mark HB" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Tuesday, September 12, 2006 8:27 AM Subject: Re: Executing binary from Servlet > HI, > It a

Re: Executing binary from Servlet

2006-09-12 Thread Mark HB
HI, It all runs fine as a standalone, and when I print the command that I am running using exec to the screen and then run it myself, it works fine. I had this servlet deployed on another machine, and I never had this problem. It is very odd, as sometimes it works and the executable is executed

Re: Executing binary from Servlet

2006-09-12 Thread Santosh Puranshettiwar
I agree with David. This does not seem to be a SecurityManager problem. Does your code run properly as a normal executable program (with main())? Sameer Acharya wrote: Have you tried adding following to your web app permissions in policy file permission java.lang.RuntimePermission "java.lang.R

Re: Executing binary from Servlet

2006-09-12 Thread Sameer Acharya
Have you tried adding following to your web app permissions in policy file permission java.lang.RuntimePermission "java.lang.Runtime"; -Sameer Mark HB <[EMAIL PROTECTED]> wrote: Hi, My apologies for the confusion, but my previous claim to have sorted this problem out is now incorrect. It see

Re: Executing binary from Servlet

2006-09-12 Thread David Delbecq
considering where the exception occured, i bet this is not a java security exception (it already passed the security test at that point and is inside the priviledged code, moreover this is an IOException not a SecurityException you get). However, there is a bad code inside UNIXProcess: IOEx

Re: Executing binary from Servlet

2006-09-12 Thread Mark HB
Hi, My apologies for the confusion, but my previous claim to have sorted this problem out is now incorrect. It seems with the upgrade to 1.5.0, the execution of the external binary does work, --- but only sometimes?? ---. I can't seem to work out the exact conditions that it works, and seems

Re: Executing binary from Servlet

2006-09-12 Thread Mark HB
Thanks Enrico, However I seem to have inadvertently solved it. I was updating to the latest release of jre and recompiled the servlet with 1.5.0 and now it works. Previously I was using 1.3.1. So there we go. Cheers Mark Enrico Giurin wrote: Hello, I guess yours is a problem of security man

Re: Executing binary from Servlet

2006-09-12 Thread Enrico Giurin
Hello, I guess yours is a problem of security manager of tomcat. I think you have to modify some entries of the catalina.policy file. http://tomcat.apache.org/tomcat-5.0-doc/security-manager-howto.html Enrico. - Original Message - From: "Mark HB" <[EMAIL PROTECTED]> To: Sent: Tuesday