Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Getting specific exception message with hibernate

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...


thanks
reply
    Bookmark Topic Watch Topic
  • New Topic