-
Notifications
You must be signed in to change notification settings - Fork 427
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
Reading data from XML column is not possible after closing the ResultSet #2479
Comments
Looking into it.. Have you tried any other driver versions where this is working? From reading the history on this, starting from issue 673, it looks like a regression. |
Issue can be replicated using driver version 12.6.1 jre11 with JDK 21. I haven't checked any other versions. |
Isn't a regression. Looks like this never worked at all. Added enhancement label for feature triage. |
I don't think this is an enhancement, the error message clearly tells what the issue is. In your repro code, the error occurs only AFTER the resultset is closed? Please reference the object before closing. This is as designed. Please let us know if you have further questions otherwise we will be closing this issue. |
Please see issue #673 ( for CLOB ) which has been fixed years ago. It mentions #567 which is a similar issue with BLOB. As per the comment #567 (comment), it looks like the behavior doesn't reflect JDBC specification. Is SQLXML behavior expected to be different? |
hi @hareesh-kp Thank you for the info. SQLXML datatype is not a type that's covered in the JDBC specs and the behavior you mentioned is not currently supported. I will add this as an enhancement request it will be considered along with other feature requests when we do planning for the next semester. |
Thank you. |
FYI, JDBC 4.3 Specification - page 140
|
Driver version
12.7.1.jre11-preview
SQL Server version
Microsoft SQL Server 2019
Client Operating System
Windows 11 Pro x64
JAVA/JVM version
openjdk 17.0.12
Table schema
Problem description
While reading SQLXML after closing the ResultSet, the code throws error. It works if the ResultSet is not closed.
Expected behavior
Even after closing the ResultSet, it should be possible to read data. CLOB type works this way.
Actual behavior
Cannot get data and getting the error "This SQLXML object has been freed. It can no longer be accessed."
Error message/stack trace
Any other details that can be helpful
The issue was originally noticed while using Spring SimpleJdbcCall. Then found this closed issue #673. It looks related.
Code to reproduce the error
The text was updated successfully, but these errors were encountered: