Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to have rollback exception reveal real Exception  RSS feed

 
Luigi Smith
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Currently I am getting the TransactionRolledbackLocalException when something goes wrong during persistence (e.g., ORA-01401: inserted value too large for column). While I can debug this fine in the logs, I would like to have my application reveal the real exception to any client that uses my SLSB. I've tried to getCause() and drill down into the exception but I never see the "real" exception. I've tried to catch the real exception, but since that's what's not being thrown, my IDE rejects that.

How can I get the "real" exception that is causing the rollback so I can send this to the client?

Very gracious for any support on this...

Lou
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Luigi Smith:
How can I get the "real" exception that is causing the rollback so I can send this to the client?

Give this a shot.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!