Closed
Description
Tom Witmer opened SPR-10385 and commented
The StatementCreatorUtils.setNull(..)
method fails with an Oracle database.
The method expects the driver to throw an exception when ps.getParameterMetaData()
is invoked (line 234), but this actually succeeds and returns a value.
Later in the method (line 241), when pmd.getParameterType()
is invoked, Oracle throws an "Unsupported Feature" exception.
I think the easiest fix here would be to move the getParameterType()
invocation into the existing try block so both conditions are accounted for.
Stack trace attached.
Affects: 3.2.2
Attachments:
- StackTrace.txt (2.58 kB)
- StatementCreatorUtils.java (17.92 kB)
- StatementCreatorUtils-ProposedFix (17.94 kB)
Issue Links:
- Update to spring 3.1.3 causes SqlException when executing sql statement with null parameters, caused by changes in StatementCreatorUtils.setNull method. [SPR-10185] #14818 Update to spring 3.1.3 causes SqlException when executing sql statement with null parameters, caused by changes in StatementCreatorUtils.setNull method.
- performancedrop due to repeated JDBC 3.0 getParameterType calls in setNull in StatementCreatorUtils [SPR-11100] #15726 performancedrop due to repeated JDBC 3.0 getParameterType calls in setNull in StatementCreatorUtils
- Protect against getParameterType cursor leak with Oracle 12c JDBC driver [SPR-14629] #19196 Protect against getParameterType cursor leak with Oracle 12c JDBC driver
Referenced from: commits 6b4c29c