| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Problem calling stored procedure from Java
>
> 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
![]() |
![]() |