Hi,
My JDev Version is 11.1.1.7.0.
I am trying to handle exceptions that are generated through ADF Model Layer. I am using HR Schema, and Employees table for my example.
Issue is, whenever I am trying to handle an exception, say SQL Integrity Constraint Violation for 2 or more columns, I am getting my common custom message. Is it possible to pinpoint which field is throwing that error, along with custom messages?
For ready reference, I have shown my codes used in my project below.
- Various error messages and constraint exceptions to be caught are stored in a Java Interface file as Key-Value Pair

2. Corresponding Resource bundle Java file which extends "ListResourceBundle" is created, that contains custom message for each error encountered in model layer.

3. A default error handler Java file is created which extends DCErrorHandlerImpl, where we override “skipException” method to handle exceptions.

4. This application is deployed as Library to main application, while taking Application Model project as a dependency to Application View project.

5. In the main application Databinding.cpx page, we set the ErrorHandlerClass as the ModelExceptionHandler class(created in Step 3) created through library.

6. The resource bundle mentioned in Library is added in our Main application through Project Properties.

7. When I ran the application, I deliberately put an invalid value in JOB_ID field, which throws a constraint error JBO-26048, and is handled, through my custom classes. I get the following error message:

8. Now I enter correct JOB_ID, but enter an invalid DEPARTMENT_ID, which again throws same error: JBO-26048. Accordingly I get expected custom message. But, for either cases I got same custom error message, which makes it difficult as end user to identify which field caused such an exception.

My requirement is to get the column name along with my custom messages, such that its easier for the end user to identify the exceptions and enter correct data.
Thank You.