This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling Oracle functions

 
Hendrik Coetzee
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 Katakkar
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also

String funct = "{ ? = ci_publish_client_data(?) }";

Should be

String funct = "{ call ? = ci_publish_client_data(?) }";
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic