Why does Oracle's JDBC driver not support Oracle's Boolean type Why does Oracle's JDBC driver not support Oracle's Boolean type oracle oracle

Why does Oracle's JDBC driver not support Oracle's Boolean type


From: PL/SQL TABLE, BOOLEAN, and RECORD Types

It is not feasible for Oracle JDBC drivers to support calling arguments or return values of the PL/SQL RECORD, BOOLEAN, or table with non-scalar element types. However, Oracle JDBC drivers support PL/SQL index-by table of scalar element types.

...

As a workaround to PL/SQL RECORD, BOOLEAN, or non-scalar table types, create container procedures that handle the data as types supported by JDBC. For example, to wrap a stored procedure that uses PL/SQL boolean, create a stored procedure that takes a character or number from JDBC and passes it to the original procedure as BOOLEAN or, for an output parameter, accepts a BOOLEAN argument from the original procedure and passes it as a CHAR or NUMBER to JDBC. Similarly, to wrap a stored procedure that uses PL/SQL records, create a stored procedure that handles a record in its individual components, such as CHAR and NUMBER, or in a structured object type. To wrap a stored procedure that uses PL/SQL tables, break the data into components or perhaps use Oracle collection types.


As answered herehttps://stackoverflow.com/a/55413745/4612499 (with code examples) the Oracle JDBC thin driver supports the PLSQL BOOLEAN type starting in 12.2.


I faced the same error while using Boolean in an entity. Resolved it by changing oracle dialect to 'org.hibernate.dialect.Oracle10gDialect' from 'org.hibernate.dialect.OracleDialect'.