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

Protect against getParameterType cursor leak with Oracle 12c JDBC driver [SPR-14629] #19196

Closed
spring-projects-issues opened this issue Aug 25, 2016 · 1 comment
Assignees
Labels
status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Aug 25, 2016

Juergen Hoeller opened SPR-14629 and commented

As mentioned in recent comments on #18398, the Oracle 12c JDBC driver has a bug that leads to a cursor leak when getParameterType throws an exception. Our #18398 change in Spring Framework 4.2.5 unfortunately reveals that cursor leak, ironically as a side effect of consistent runtime behavior which implies consistent exposure to that leak :-(

Let's consider a spring.jdbc.getParameterType.ignore default of true for Oracle 12c for the time being.


Affects: 4.2.5, 4.3 GA

Issue Links:

Referenced from: commits 52447ef, 2adbfb6

Backported to: 4.2.8

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Revised for 4.3.3 and 4.2.8 now: StatementCreatorUtils does not use getParameterType on any Oracle driver by default now. If you're on 12c (possibly 12.2 or a custom patch) and would like it to be used, specify spring.jdbc.getParameterType.ignore=false. Since those calls seem to be expensive as well, it is arguably better to only use them when actually needed anyway.

Note that 5.0 is streamlined in this respect: no tracking of drivers without getParameterType support there, and no special exclusion of Oracle drivers either. We essentially expect an up-to-date, fully patched driver at that point (early 2017), in combination with statement pooling. If there are still issues there, the escape hatch remains: spring.jdbc.getParameterType.ignore=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants