Skip to content

JdbcTemplate cannot set null parameter with Oracle driver [SPR-10385] #15018

Closed

Description

@spring-projects-issues

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:

Issue Links:

Referenced from: commits 6b4c29c

Activity

  1. spring-projects-issues commented on Mar 15, 2013

    @spring-projects-issues
    CollaboratorAuthor

    Tom Witmer commented

    Source file attached, in case the line numbers don't match up to trunk source.

  2. spring-projects-issues commented on Mar 15, 2013

    @spring-projects-issues
    CollaboratorAuthor

    Tom Witmer commented

    Attached source file that should resolve the issue.

  3. spring-projects-issues commented on Mar 15, 2013

    @spring-projects-issues
    CollaboratorAuthor

    Tom Witmer commented

    I just confirmed via the debugger that the proposed fix (attachment) would resolve the problem I'm seeing.

  4. added this to the 3.2.3 milestone on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions