Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-10385

JdbcTemplate cannot set null parameter with Oracle driver

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 3.2.2
    • Fix Version/s: 3.2.3, 4.0 M1
    • Component/s: None
    • Labels:
    • Last commented by a User:
      true

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              twitmer Tom Witmer
              Last updater:
              Spring Issuemaster
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 30 weeks, 4 days ago