Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> How to debug java stored procedure

How to debug java stored procedure

From: John Dunn <jdunn_at_sefas.com>
Date: Thu, 25 May 2006 10:14:29 +0100
Message-ID: <001101c67fdb$a15ab6c0$3e04050a@johnman>


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

--
http://www.freelists.org/webpage/oracle-l
Received on Thu May 25 2006 - 04:14:29 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US