| Author |
Getting specific exception message with hibernate
|
sameer joshi
Greenhorn
Joined: Jul 20, 2007
Posts: 1
|
|
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... thanks
|
 |
 |
|
|
subject: Getting specific exception message with hibernate
|
|
|