title: How to handle callableStatement.registerOutParameter(1, java.sql.Types.BOOLEAN);
body: <p>Have a stored procedure in Oracle 10g/11g like the following:</p>
  
  <pre><code>CREATE OR REPLACE 
  PROCEDURE SP_SOME_PROC (  PRM_ID IN NUMBER , START_DATE IN DATE,  RESULT OUT BOOLEAN) 
  is...
  </code></pre>
  
  <p>Using the following to code to call it and get the result:</p>
  
  <pre><code>String sql = "{call SP_SOME_PROC(?,?,?) }";
  
  callableStatement = conn.prepareCall(sql);
  callableStatement.setLong(1, theid);
  callableStatement.setDate(2,  new java.sql.Date(startDate.getTime()));
  callableStatement.registerOutParameter(3, java.sql.Types.BOOLEAN);
  
  callableStatement.executeUpdate();
  
  Boolean result = callableStatement.getBoolean(3);
  </code></pre>
  
  <p>the code above yields, however, an exception like the following</p>
  
  <pre><code>[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.registerOutParameterInternal(OracleCallableStatement.java:135)
  [10/8/13 2:28:24:737 EEST] 0000009a SystemErr     R     at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:304)
  [10/8/13 2:28:24:737 EEST] 0000009a SystemErr     R     at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:393)
  [10/8/13 2:28:24:737 EEST] 0000009a SystemErr     R     at oracle.jdbc.driver.OracleCallableStatementWrapper.registerOutParameter(OracleCallableStatementWrapper.java:1569)
  </code></pre>
  
  <p>I experimented other combinations such as </p>
  
  <pre><code>String sql = "{? = call SP_SOME_PROC(?,?) }";
  callableStatement = conn.prepareCall(sql);
  callableStatement.registerOutParameter(1, OracleTypes.BOOLEAN);
  </code></pre>
  
  <p>but no luck!</p>