| Author |
Calling Oracle functions
|
Hendrik Coetzee
Greenhorn
Joined: Nov 12, 2004
Posts: 1
|
|
Hi Having a bit of trouble when calling an Oracle function. In the code below, as soon as I call the execute() function, I get the exception. I don't get it with stored procedured that don't return values, but as soon as a stored procedure or function returns a resultset (or value) this exception is thrown. This is using the latest ojdbc14.jar drivers on an 8i database. Would greatly appreciate any ideas / thoughts. Thank you Exception: Exception in thread "main" java.lang.NullPointerException at oracle.jdbc.driver.T4C8Oall.getNumRows(T4C8Oall.java:728) at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:787) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888) at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:2979) at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4103) at com.ccoster.beans.DBConn.execFunction(DBConn.java:484) at OSDXMLPublish.runCIFEngine(OSDXMLPublish.java:328) at OSDXMLPublish.start(OSDXMLPublish.java:284) at OSDXMLPublish.main(OSDXMLPublish.java:84)
|
 |
nilesh Katakkar
Ranch Hand
Joined: Oct 27, 2004
Posts: 35
|
|
Whats the Java version you are using ? ojdbc14.jar is used with Java 1.4.x ? For older versions you will still need to go to classes12.jar
|
nilesh<br />neilindallas@hotmail.com
|
 |
nilesh Katakkar
Ranch Hand
Joined: Oct 27, 2004
Posts: 35
|
|
Also String funct = "{ ? = ci_publish_client_data(?) }"; Should be String funct = "{ call ? = ci_publish_client_data(?) }";
|
 |
 |
|
|
subject: Calling Oracle functions
|
|
|