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
Labels
type: bug A general bug
Milestone

Comments

@Gama11
Copy link

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?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 3, 2020
@snicoll snicoll added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Dec 8, 2020
@snicoll snicoll added this to the 2.4.x milestone Dec 8, 2020
@snicoll
Copy link
Member

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
@wilkinsona
Copy link
Member

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
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

5 participants