You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christoph Kukulies <ku...@gilberto.physik.rwth-aachen.de> on 2000/11/15 19:13:54 UTC

Runtime.exec Nullpointer Exception

Weird, I reinstalled Tomcat 3.1beta (changed to jdk1.2 also)
and suddenly one of my servlets crashes:

Runtime.exec crashes:
            if(type.compareTo("Diff Run")==0){
                  out.println("Diff Run");
                  try {
                   cmdarray[0]="/usr/local/www/cgi-bin/Diffrun";
                   cmdarray[1]=Proband;
                   cmdarray[2]=Referenz;
                   cmdarray[3]=Mandant;
                   cmdarray[4]=Testrechner;
                   cmdarray[5]=null;
                   out.println("try executing..." + cmdarray[0] + "\n");
                   try {
                        int b;
                        Process p=runner.exec(cmdarray);
                        InputStream i=p.getInputStream();
                        while((b=i.read()) >= 0) {
                                out.write(b);out.flush();
                        }
                      } catch(Exception e) {
                           out.println("some exception occured ["+ e + "]");
                          ^^^^^^^^^^^^^ This happens ^^^^^^^^^^


Any clues?


-- 
Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de