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

Home -> Community -> Usenet -> c.d.o.server -> Re: Problem calling stored procedure from Java

Re: Problem calling stored procedure from Java

From: ohaya <ohaya_at_cox.net>
Date: Tue, 21 Jun 2005 00:25:57 -0400
Message-ID: <42B796D5.EBA89E58@cox.net>

>
> put a System.out.println(e) in the catch block, that should help
> debugging.

Chet,

I just tried that, a couple of different ways actually, but still get the same messages, and no additional messages. Here's the new Java code:

       public static void doEncryption(String enKey, String uName, String pwd) throws SQLException {

        	Connection conn = null;
        	CallableStatement proc = null;

       try
       {
        // Load the Oracle JDBC driver
        DriverManager.registerDriver(new
oracle.jdbc.driver.OracleDriver());

        System.out.println("In Provider/initialize: About to open connection to Oracle DB...");

	    // Open the connection
        conn = DriverManager.getConnection
("jdbc20:oracle:thin:@jimnew:1521:CT","XX_OWNER", "XXXXX");
       	System.out.println("In Provider/initialize:  Finished opening
connection to Oracle DB...");
       	
          // con  = connectionPool.getConnection();
          proc = conn.prepareCall("{ call encrypt_password(?, ?, ?) }");
          proc.setString(1, enKey);
          proc.setString(2, uName);
          proc.setString(3, pwd);
          System.out.println("In Provider/initialize:  Finished setting
parameters - about to execute procedure");
          try {
          proc.execute();
          } catch (Exception x){
          	System.out.println("Inside exception: " + x);
          }
          System.out.println("In Provider/initialize:  Just returned
from proc.execute()");
       }
       finally
       {
          try
          {
             proc.close();
          }
          catch (SQLException e) {
          	System.out.println("Error in doEncryption: " + e);
          	}
          catch (Exception f) {
          	System.out.println("Error in doEncryption/Exception:" + f);
          }
          conn.close();
       }

    }

Jim Received on Mon Jun 20 2005 - 23:25:57 CDT

Original text of this message

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