Hello,
I have the below problem
I have the below java file called procedure1.java
import java.sql.*;
public class procedure1 {
public static void procedure1(int[] var0) throws SQLException, Exception {
// Get connection to the database
Connection con = DriverManager.getConnection("jdbc:default:connecti on");
PreparedStatement stmt = null;
String sql;
if (con != null)
con.close();
// Set return parameter
var0[0] = var0[0];
}
}
I then create this and put in into a path where the CLASS Variable is present, then I do the below
That is create a stored procedure
CREATE PROCEDURE DB2ADMIN.PROC1(OUT var1 INTEGER) LANGUAGE JAVA PARAMETER STYLE JAVA READS SQL DATA FENCED EXTERNAL NAME 'procedure1.procedure1'
The I call the stored procedure
db2 call db2admin.proc1(?)
And it gives me the error
SQL4304N Java stored procedure or user-defined function "DB2ADMIN.PROC1", specific name "SQL070621173428700" could not load Java class "procedure1",reason code "1". SQLSTATE=42724
It works on an other system of mine but not on this system and I am not able to figure it out.
Could someone help me here ?
The machine I have is a Windows XP machine with SP2.
Ashok