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

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

RE: How to debug java stored procedure

From: Borrill, Christopher <Chris.Borrill_at_hp.com>
Date: Tue, 30 May 2006 15:28:36 +1200
Message-ID: <94941EE84F6FCD43B55C5B64DD0DAC6A0127ADFD@nzmexc01.asiapacific.cpqcorp.net>


The new SQL Developer and Jdeveloper from Oracle both contain a full debugger which allows you to step through from PL/SQL into Java and examine variables in PL/SQL and Java.

P.S.

I am not sure about your call of the garbage collector (rt.gc()), the behaviour of this method is not predictable outside the db, so I would be very cautious about what it really does inside the DB.

Chris

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of John Dunn Sent: Thursday, 25 May 2006 9:14 p.m.
To: 'oracle-l digest users'
Subject: How to debug java stored procedure

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


--
http://www.freelists.org/webpage/oracle-l
Received on Mon May 29 2006 - 22:28:36 CDT

Original text of this message

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