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

NativeJdbcExtractorAdapter .getNativeConnectionConnection() returning a null [SPR-4597] #9274

Closed
spring-projects-issues opened this issue Mar 18, 2008 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Mar 18, 2008

Caesar Loh opened SPR-4597 and commented

In line 108 of NativeJdbcExtractorAdapter, it will return a null for connection.

This occur when the datasource is being retrieved from another server rather than the holding server. The metadata.getConnection() will return a null, and obviously by comparing it with the original connection, it will be different. Thus, this method will return a null.

How about doing a simple check for null before returning the connection? In any case, metadataConnection will simply return the same connection.


Affects: 2.0.6, 2.0.7, 2.0.8, 2.5.1, 2.5.2

Issue Links:

Backported to: 2.0.9

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Thanks for pointing this out - I've fixed this for both 2.5.3 and 2.0.9! This will be available in tonight's 2.5.3 snapshot already.

Juergen

@spring-projects-issues spring-projects-issues added type: bug A general bug status: backported An issue that has been backported to maintenance branches in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 2.5.3 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants