title: Why does Oracle's JDBC driver not support Oracle's Boolean type
body: <p>I am new to JDBC and have been playing with it. Other posts in the forum indicate that Oracle's JDBC driver does not support Oracle PLSQL Boolean type. I find that really strange:</p>
  
  <p>From the <a href="http://docs.oracle.com/cd/E11882_01/java.112/e16548/apxref.htm#JJDBC28925" rel="noreferrer">oracle jdbc documentation</a> it seems like it does:</p>
  
  <p><img src="https://i.stack.imgur.com/O6xfM.jpg" alt="enter image description here"></p>
  
  <p>But in <a href="http://docs.oracle.com/cd/E11882_01/java.112/e16548/apxtblsh.htm#JJDBC28981" rel="noreferrer">another section</a> it says it does not allow passing of BOOLEAN parameters to PL/SQL stored procedures.</p>
  
  <p>Isn't the the documentation contradicting itself ?</p>
  
  <p>It does not let me pass or accept Boolean values from PL/SQL procedures/functions. It gives me the following exception:</p>
  
  <pre><code>Exception occured in the database
  Exception message: Invalid column type: 16
  Database error code: 17004
  java.sql.SQLException: Invalid column type: 16
      at oracle.jdbc.driver.OracleStatement.getInternalType(OracleStatement.java:3963)
      at oracle.jdbc.driver.OracleCallableStatement.registerOutParameterInternal(OracleCallableStatement.java:135)
      at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:304)
      at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:393)
      at oracle.jdbc.driver.OracleCallableStatementWrapper.registerOutParameter(OracleCallableStatementWrapper.java:1579)
      at com.HrManager.insertNewEmployee(HrManager.java:1300)
      at com.HrManager.main(HrManager.java:1411)
  </code></pre>
  
  <p>I am trying to understand why JDBC Oracle Drivers do not support Boolean types. Is it because PL/SQL <code>"Boolean"</code> accepts null values and Java's primitive type <code>"boolean"</code> does not ?</p>
  
  <p>But the counter to it would be , Java's wrapper class <code>"Boolean"</code> does accept nulls. This can be used to map to PLSQL's Boolean type . Can some one throw more light on this.</p>