RE: How to debug java stored procedure

  • From: "Borrill, Christopher" <Chris.Borrill@xxxxxx>
  • To: "oracle-l digest users" <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 30 May 2006 15:28:36 +1200

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@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] 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




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


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


Other related posts: