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

Exceptions are still translated by JdbcTransactionManager when spring.dao.exceptiontranslation.enabled is false #24321

Closed
Gama11 opened this issue Dec 3, 2020 · 2 comments
Assignees
Milestone

Comments

@Gama11
Copy link

@Gama11 Gama11 commented Dec 3, 2020

We ran into an issue with the 2.4.0 release because it replaced DataSourceTransactionManager with JdbcTransactionManager. The latter does exception translation:

This led to a DuplicateKeyException exception being thrown rather than a TransactionSystemException. We didn't expect this because we had explicitly disabled exception translation:

spring.dao.exceptiontranslation.enabled=false

Perhaps DataSourceTransactionManager should continue to be used if this property is set to false?

@snicoll
Copy link
Member

@snicoll snicoll commented Dec 8, 2020

Thanks for the report @Gama11. I overlooked that property when I did that change.

@philwebb philwebb changed the title 2.4.0 translates exceptions during transactions even with exception translation disabled Exceptions are still translated by JdbcTransactionManager when spring.dao.exceptiontranslation.enabled is false Jan 11, 2021
@philwebb philwebb self-assigned this Jan 11, 2021
@philwebb philwebb modified the milestones: 2.4.x, 2.4.2 Jan 11, 2021
@philwebb philwebb closed this in 53a6fa2 Jan 11, 2021
@wilkinsona
Copy link
Member

@wilkinsona wilkinsona commented Jan 18, 2021

Please see #24867 for details of a refinement that will be made to the fix for this issue. It should be available in 2.4.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants