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

Nested transaction savepoints are broken in SQL Server #34233

Closed
jameswilliams1 opened this issue Jan 10, 2025 · 4 comments
Closed

Nested transaction savepoints are broken in SQL Server #34233

jameswilliams1 opened this issue Jan 10, 2025 · 4 comments
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: regression A bug that is also a regression
Milestone

Comments

@jameswilliams1
Copy link

Similar to #33987 , with the update to Spring boot 3.4 nested transactions are also broken in SQL Server. Annoyingly SQL Server JDBC throws a com.microsoft.sqlserver.jdbc.SQLServerException rather than java.sql.SQLFeatureNotSupportedException so this isn't handled by the fix that went in for Oracle.

2025-01-10 01:01:13,380 DEBUG [tomcat-handler-493] o.s.jdbc.support.JdbcTransactionManager - Releasing transaction savepoint
2025-01-10 01:01:13,381 DEBUG [tomcat-handler-493] c.m.s.jdbc.internals.SQLServerException - *** SQLException: com.microsoft.sqlserver.jdbc.SQLServerException: This operation is not supported. This operation is not supported.
2025-01-10 01:01:13,381 DEBUG [tomcat-handler-493] o.s.jdbc.support.JdbcTransactionManager - Initiating transaction rollback
2025-01-10 01:01:13,381 DEBUG [tomcat-handler-493] o.s.jdbc.support.JdbcTransactionManager - Rolling back JDBC transaction on Connection [HikariProxyConnection@107047065 wrapping ConnectionID:1 ClientConnectionId: c741adb7-2049-48ae-ada2-37974c7dc396]
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jan 10, 2025
@jhoeller jhoeller added in: data Issues in data modules (jdbc, orm, oxm, tx) type: regression A bug that is also a regression and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jan 10, 2025
@jhoeller jhoeller self-assigned this Jan 10, 2025
@jhoeller jhoeller added this to the 6.2.2 milestone Jan 10, 2025
@jhoeller
Copy link
Contributor

We can check for a "not supported" exception message for the time being, next to the SQLFeatureNotSupportedException check.

@jhoeller
Copy link
Contributor

@jameswilliams1 this is available in the latest 6.2.2 snapshot now, please give it an early try if you have the chance (before 6.2.2 becomes generally available on Thursday).

@jameswilliams1
Copy link
Author

@jameswilliams1 this is available in the latest 6.2.2 snapshot now, please give it an early try if you have the chance (before 6.2.2 becomes generally available on Thursday).

Thanks for the quick resolution! Unfortunately it seems our company proxy is blocking any snapshots getting in so I can't test before the release, but from looking at the change I'm fairly certain that will fix the issue.

I've also raised this issue with the SQL Server JDBC repo (linked) and they have fixed there too (waiting for merge), but I think your fix will also have to stay for quite a while in order to maintain support for older MSSQL JDBC drivers.

@jhoeller
Copy link
Contributor

No worries, and thanks for submitting this to the SQL Server team as well.

Indeed, we'll keep our fix around for the time being - for compatibility with the existing driver version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: regression A bug that is also a regression
Projects
None yet
Development

No branches or pull requests

3 participants