Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to handle Unique key voilation exception with the custom error message?

619299Feb 14 2009 — edited Sep 11 2009
HI All

Hi i have a unique index on database table with 18 columns. I have ADF table on the screen based on view object and which has CreateInsert and Commit buttons.
My requirement is when user tries to insert the duplicate record the database is throwing Key voilation exception... When I get this exception I have to display my custom error message on the screen.

How to acheive this ? I have commit method in my backing bean for the commit button, so when I tried to catch the SQLIntegrationViolationException it says that exception never thrown. So how to handle this situation?


Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 9 2009
Added on Feb 14 2009
12 comments
5,821 views