How to debug java stored procedure

  • From: "John Dunn" <jdunn@xxxxxxxxx>
  • To: "'oracle-l digest users'" <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 25 May 2006 10:14:29 +0100

I am trying to debug a java stored procedureon Oracle 10.2.

It has always worked fine on Oracle 8 and 9 so have never needed to debug.

It is returning a return code(rc) of 3.
How do I find out what the actual exception was. I presume I need to get
more info out of the obejct t but not being a java programmer I don't know
how

Can any one help?



CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "function_os_command" AS
import java.io.*;
import java.util.*;
public class function_os_command
{
   public static int Run(String Command)
   {
    int rc = 0;
    try
    {
    Runtime rt = Runtime.getRuntime();
    Process p = rt.exec(Command);
    try {
         rc = p.waitFor();
        } catch (InterruptedException intexc) { rc = 2; }

    rt.gc();
    } catch (Throwable t) { rc = 3; }
    return(rc);
   }
}
/

John




--
//www.freelists.org/webpage/oracle-l


Other related posts: