• Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting specific exception message with hibernate  RSS feed

sameer joshi
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all i am working on one project in which we are using hibernate3 for database transactions.. proper mapping is done.. now when i try to insert any record in database which violates any relation it throws exception.. How to catch appropriate message of exception and get it in variable... i am finding it difficult as i am getting generic exception bellow save method of hibernate.. I tried catching it with GenericJDBCException and BatchUpdateException but it is not caught by them it is going in final catch block of normal Exception which does not give me specific error...

here is logger output...

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!