Skip to content

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

Closed

Description

@spring-projects-issues

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

Activity

  1. spring-projects-issues commented on Aug 26, 2016

    @spring-projects-issues
    CollaboratorAuthor

    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

  2. added
    status: backported
    type: enhancement
    on Jan 11, 2019
  3. added this to the 4.3.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

status: backportedtype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions