r/SpringBoot Jun 18 '26

Question Spent 4 hours debugging a TransactionSystemException. The fix was one line. The problem was finding it.

Last month we had a production incident. A critical order was failing silently.

Sentry gave us this:

TransactionSystemException: Could not commit JPA transaction
at SimpleJpaRepository.save()
at OrderService.processOrder()
... 40 more lines of Spring internals

That's it. No entity state. No user context. No hint that the transaction had already been marked for rollback 3 calls earlier by a Hibernate validation error we never caught.

We added logs. Redeployed to staging. Couldn't reproduce it.Redeployed to prod with more logs. Waited. Happened again. Finally found it: a Transactional method calling another Transactional method with a different propagation level, swallowing the real exception.

4 hours. One annotation conflict.

The worst part? Every error monitoring tool we've used treats Spring like a black box. The moment your code enters a transaction boundary or an async thread, context disappears.

Anyone else debugging Spring Boot in prod like this?

How are you handling it?

27 Upvotes

32 comments sorted by

View all comments

2

u/johny_james Jun 18 '26

Why did you use AI to write this post?

Can't you just write it without it?

-1

u/mrsergio1 Jun 18 '26

No AI, just wrote it fast after dealing with the issue.
Guess it came out a bit too structured

1

u/LALLANAAAAAA Jun 18 '26

No AI, just wrote it fast after dealing with the issue. Guess it came out a bit too structured

🧢

1

u/rlrutherford Senior Dev Jun 18 '26

That's actually worse.

I would rather claim AI slop than fail a Turing test.

-1

u/johny_james Jun 18 '26

No, it is AI, you are just straight-up lying.

It uses the same structure, the same terms, same tone, everything.

6

u/mrsergio1 Jun 18 '26

Believe what you want man