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]
Comment From: jhoeller
We can check for a "not supported" exception message for the time being, next to the SQLFeatureNotSupportedException
check.
Comment From: jhoeller
@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).
Comment From: jameswilliams1
@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.
Comment From: jhoeller
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.