I am trying to load some Java stored procedures into an Oracle 10g database via JDBC. The statement that I am implementing is
CREATE OR REPLACE JAVA SOURCE NAMED "test.Test" AS
package test;
public class Test {
public static String myMethod(String a) {
return a;
}
};
Running this through TOAD works very well, but when starting through my JDBC client, it produces the following error:
Exception in thread "Thread-3" java.lang.NullPointerException
at oracle.jdbc.driver.T4C8Oall.getNumRows(T4C8Oall.java:728)
at oracle.jdbc.driver.T4CStatement.execute_for_rows(T4CStatement.java:478)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028)
at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1451)
at ejsdal.CreateDBJavaSQL.executeScript(CreateDBJavaSQL.java:23)
at ejsdal.OperationController.run(OperationController.java:182)
I use java.sql.Statement "executeUpdate", passing a string in the first block of code.
Can I load a java source through JDBC?
source
share