Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
spring-projects-issues opened this issue Mar 15, 2013 · 3 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Mar 15, 2013

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

@spring-projects-issues
Copy link
Collaborator Author

Tom Witmer commented

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

@spring-projects-issues
Copy link
Collaborator Author

Tom Witmer commented

Attached source file that should resolve the issue.

@spring-projects-issues
Copy link
Collaborator Author

Tom Witmer commented

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants