You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spring JDBC uses StatementCreatorUtils to identify the mapping between Java data types and the SQL data types when persisting DOs using BeanPropertySqlParameterSource for DO to table mapping. The data type mappings are hard coded in StatementCreatorUtils and the following new mapping have been added starting from v 4.2.3:
javaTypeToSqlTypeMap.put(boolean.class, Types.BOOLEAN);
javaTypeToSqlTypeMap.put(Boolean.class, Types.BOOLEAN);
The Oracle JDBC driver does not know how to handle Types.BOOLEAN for the target DB column, so we get the ‘java.sql.SQLException: Invalid column type’ when trying to write a DO which has a boolean data member
To bypass this issue in the application domain, the hard coded data type map defined in StatementCreatorUtils may updated by removing the faulty mappings using reflection.
Please consider addressing this issue in the framework domain too.
Ionut Gradinaru opened SPR-14581 and commented
Spring JDBC uses StatementCreatorUtils to identify the mapping between Java data types and the SQL data types when persisting DOs using BeanPropertySqlParameterSource for DO to table mapping. The data type mappings are hard coded in StatementCreatorUtils and the following new mapping have been added starting from v 4.2.3:
javaTypeToSqlTypeMap.put(boolean.class, Types.BOOLEAN);
javaTypeToSqlTypeMap.put(Boolean.class, Types.BOOLEAN);
The Oracle JDBC driver does not know how to handle Types.BOOLEAN for the target DB column, so we get the ‘java.sql.SQLException: Invalid column type’ when trying to write a DO which has a boolean data member
To bypass this issue in the application domain, the hard coded data type map defined in StatementCreatorUtils may updated by removing the faulty mappings using reflection.
Please consider addressing this issue in the framework domain too.
Affects: 4.2.4
Issue Links:
The text was updated successfully, but these errors were encountered: