Have a stored procedure in Oracle 10g/11g like the following:

CREATE OR REPLACE PROCEDURE SP_SOME_PROC ( PRM_ID IN NUMBER , START_DATE IN DATE, RESULT OUT BOOLEAN) is...Using the following to code to call it and get the result:

String sql = "{call SP_SOME_PROC(?,?,?) }";callableStatement = conn.prepareCall(sql);callableStatement.setLong(1, theid);callableStatement.setDate(2, new java.sql.Date(startDate.getTime()));callableStatem ent.registerOutParameter(3, java.sql.Types.BOOLEAN);callableStatement.executeU pdate();Boolean result = callableStatement.getBoolean(3);the code above yields, however, an exception like the following

[10/8/13 2:28:24:736 EEST] 0000009a SystemErr R java.sql.SQLException: Invalid column type: 16[10/8/13 2:28:24:737 EEST] 0000009a SystemErr R at oracle.jdbc.driver.OracleStatement.getInternalType (OracleStatement.java:3950)[10/8/13 2:28:24:737 EEST] 0000009a SystemErr R at oracle.jdbc.driver.OracleCallableStatement.registe rOutParameterInternal(OracleCallableStatement.java :135)[10/8/13 2:28:24:737 EEST] 0000009a SystemErr R at oracle.jdbc.driver.OracleCallableStatement.registe rOutParameter(OracleCallableStatement.java:304)[10/8/13 2:28:24:737 EEST] 0000009a SystemErr R at oracle.jdbc.driver.OracleCallableStatement.registe rOutParameter(OracleCallableStatement.java:393)[10/8/13 2:28:24:737 EEST] 0000009a SystemErr R at oracle.jdbc.driver.OracleCallableStatementWrapper. registerOutParameter(OracleCallableStatementWrappe r.java:1569)I experimented other combinations such as

String sql = "{? = call SP_SOME_PROC(?,?) }";callableStatement = conn.prepareCall(sql);callableStatement.registerOu tParameter(1, OracleTypes.BOOLEAN);but no luck!


Check Solution