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

JdbcUtils getResultSetValue does not handle Apache Derby BLOBs correctly [SPR-8810] #13452

spring-projects-issues opened this issue Nov 1, 2011 · 1 comment
in: data Issues in data modules (jdbc, orm, oxm, tx) type: bug A general bug


Copy link

spring-projects-issues commented Nov 1, 2011

Pawel Fronczak opened SPR-8810 and commented

getResultSetValue() reads the BLOB column twice - at first with the ResultSet.getObject(int) method and then with the ResultSet.getBytes(int). This behavior is not supported by the Apache Derby - the getBytes() method will fail to read correct data.

The java.sql.ResultSet API states that: "For maximum portability, result set columns within each row should be read in left-to-right order, and each column should be read only once.". Therefore i is possible that this issue does not only apply to the Apache Derby database.

I have attached a code snippet reproducing this bug.

Affects: 3.0.4, 3.0.6


Issue Links:

Copy link
Collaborator Author

spring-projects-issues commented Oct 28, 2014

Juergen Hoeller commented

As of 4.1.2, we're reading Blob / Clob content via Blob.getBytes // Clob.getSubString now instead of going through the ResultSet again. This should satisfy the maximum portability requirement.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: data Issues in data modules (jdbc, orm, oxm, tx) type: bug A general bug
None yet

No branches or pull requests

2 participants