ADF-BC:Customize Error Messages for Database Constraint Violations

Hai all
I have an apploication using JDEV 10.1.3.3 and ADF BC.
In my applcation I'm overriding the default error messages on violation of constraints by using a custom message bundle .
I did all the things specified in Oracle® ADF Developer's Guide
Chapter 25.8 Customizing Business Components Error Messages .
IT is working fine
My problem is along with the userdefined custom messge in the bundle
another default message is showing which is nothing meaningful to the
end user.
For Ex: for an Uniqiue constraint the following error message comes
Error
1 .The Usercode should be unique!!!
2 .ORA-00001: unique constraint (MYDB.USERCODEUNIQUE) violated
ORA-06512: at line 1
The first line is defined by me.the second one is added automatically.
I want to prevent showing the error no 2 for all DB constraint violations
Is there any method to do it.I think I'm missing someting
Please help me.This is very annoying to the end user.
Thanks
Ans

Hi,
guess you know about this
http://download-uk.oracle.com/docs/html/B25947_01/bcadvgen008.htm#sthref2393
So have a look here
http://download-uk.oracle.com/docs/html/B25947_01/web_val008.htm
The code for this is from SRDemo and allows you to suppress messages from JSF display
Frank

Similar Messages

  • Custom Error Messages for Database Constraint Violations Problem

    Hi
    I have added a custom message bundle for the model project as explained in
    37.8.3 in the Fusion Developer's Guide - How to customize error messages for database constraint violations.
    http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcadvgen.htm#BABEFGCI
    Constraint Name : SYS_C0018574
    And I have following CustomErrorMessages class
    public class DBCustomErrorMessages extends ListResourceBundle {
        private static final Object[][] sMessageStrings =
            new String[][] { { "SYS_C0018574",
                               "Existing Record Found" } };
        protected Object[][] getContents() {
            return sMessageStrings;
    }This works fine when I run application model and adding records to vialate the constraint. So it gives me following message
    (oracle.jbo.DMLConstraintException) Existing Record FoundBut when run ui project it does not fire.
    Still it gives the message
    ORA-00001: unique constraint (CCBS2.SYS_C0018574) violatedCould you please shed some light?
    Edited by: deshan on Mar 15, 2011 11:28 AM

    Please see the image.
    http://4.bp.blogspot.com/-Fna66p-W5Jw/TX7uSQqqBtI/AAAAAAAAAH0/D1APg6oAIxI/s1600/1.JPG
    Error in Application Module ORA-00001: unique constraint (CCBS2.SYS_C0018574) violated exception is different from ui project.
    Any hint?
    Thanks
    deshan
    Edited by: deshan on Mar 15, 2011 10:16 AM

  • JhsError Messages for Database constraint

    Hello JhaedStart Team
    I want to display mycustome entity alias name in place of entity name in Jhs Error messages for Database constraint , as you know we can customize this error message by replacing ConstraintName as a key in our registered customMessage Bundle (according to 25.8.3 sction of ADFdevelopers guide) .
    In order to do that I should disable JHS NLS generation for JHS because it's custome messages prevent my message to be display from my customMessage Bundle , So I have tried to delete constraint key (eg CASCADING_DELETE_VIOLATION) from GeneratorText.properties but I see that the CASCADING_DELETE_VIOLATION message still generated in my project JHS message bundle.
    Please help me to fix the problem

    JHeadstart also supports customizing database constraint messages, as explained in section 11.4 of the JHeadstart 10.1.3.2 Developer's Guide. So you don't need to use the technique of section 25.8.3 of the ADF Developer's Guide, you can customize the message directly in the JHeadstart resource bundle.
    Hope this helps,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • CreateException: error message for unique constraint isn't very helpful

    When I create a CMP bean in a table containing a unique constraint, I receive the expected CreateException. However, the error message looks like:
    "Error creating EntityBean: ORA-00001: unique constraint (SID.SYS_C005934) violated"
    This message isn't particularly helpful, especially if there are, say, three unique constraints, and the only difference is the "SYS_CXXXXXX" number. There is no way to tell which number applies to which constraint, and this makes it difficult to give a "readable" error message to the end-user.
    Is there a way of either (a) Setting the error message to be thrown by a unique constraint violation or (b) A means of getting the column name that was the focus of the violation? Either of these would make it easier to map an "readable" error message to the exception.
    Much thanks,
    -Roger

    Hi Roger,
    How about trying to give meaningfull names while creating the table, so that when the exception is throw, it would be easy to find the column
    which generated the exception.
    something like,
    SQL>create table table1
    id number(10) constraint UNIQUE_TABLE1_ID unique
    Table created
    SQL> insert into table1 values(1);
    1 row created.
    SQL> insert into table1 values(1);
    insert into table1 values(1)
    ERROR at line 1:
    ORA-00001: unique constraint (SCOTT.UNIQUE_TABLE1_ID) violated
    Hope this helps
    Regards
    Elango.

  • Customize error message for type conversion

    Hi,
    <h:inputText value=....>
    <f:validateDoubleRange />
    </h:inputText>
    I try to customize the error message if the value can't be converted to double, but i keep getting the default.
    I have this in my properties file
    javax.faces.validator.DoubleRangeValidator.TYPE=Not a valid number.
    I can change the other properties like minimum and maximum, but not type. Can someone help me figure this out?
    Thank you

    Hi,
    You are on the right track of customising the error messages, however I will have it tested and let you know the results on the JSP's. "Unknown Type of..." error occurs when the webconnector is unable to resolve the URL. This can be like, the file may not be present etc. One way is to provide the fullname of the file along with the URL and check if the app server is able to hit the page. Incase you still experience the error then we can investigate further on this by looking at the KXS and KJS log files.
    Regards
    Ganesh .R
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support

  • Custom Error Message For Session State Violation

    Hi,
    Can anyone tell me is there a way to have a custom error message whenever there is a session state protection violation ?
    Currently it throws an error message as follows:
    "Session state protection violation: This may be caused by manual alteration of a URL containing a checksum or by using a link with an incorrect or missing checksum. If you are unsure what caused this error, please contact the application administrator for assistance"
    Can i have a custom message here ? An image, or a custom text for a more friendly end-user message
    Thank you very much,
    Srikumar S

    Version of database? Version of APEX? Browsers involved? More information you provide, better response from people here...
    Thank you,
    Tony Miller
    Ruckersville, VA

  • Error Message for Integrity Constraint

    Hi,
    I have a table with called TMREF_MEDIATION_DATA_TREATMENT and one called TMREF_UOC_CRITERIA_MAPPING. There is a foreign key constraint and the TMREF_UOC_CRITERIA_MAPPING
    table has the UID column from the other table in it. When I select delete form TMREF_MEDIATION_DATA_TREATMENT I get an error as expected:
    ORA-02292: integrity constraint (MRS_DEV.TMREF_UOC_CRIT_TO_TREAT_FK2) violated - child record found
    Error
    Unable to process row of table TMREF_MEDIATION_DATA_TREATMENT.
    OK
    But is there any way that I can make this error more user friendly? I do not want it to delete if there is a child record - it must just warn the user.
    Thanks.

    You could use this method:
    http://apex.oracle.com/pls/otn/f?p=31517:185
    which is in the page process. However, you could also create a validation, which will fire before the process is run and check the same.
    Entering an invalid number will violate the constraint (the column is a number column) and this will then call the exception INVALID_NUMBER. You may also declare the constraint exception using
    child_record_not_found EXCEPTION;
    PRAGMA EXCEPTION_INIT (child_record_not_found, -02292);
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How to Customize Error message in JXL

    Hi All,
    I want to customize error message in JXL. I.e. When we apply number validation to a cell and if you enter invalid data MS-Excel shows error message saying that "The value you entered is not valid". But I want to customize this message to "Data should be a decimal number". Can anyone help me how to acheive it. Thanks in Advance.
    Thanks
    Venkat.

    Thx alot...!! for all your valuable replies.
    And, I found a way to achieve my requirement in a declarative way.
    I just created an entity validator on EmployeeEO.
    - Rule_Type: Key Exists
    - Rule Definition:
    - Validation Target Type: Entity Object
    - Association Name : <Select Assiociation created > "EmpDeptFK"
    - Failure Handling:
    - Error Message: "Invalid Deparment ID {0} Entered. Please enter a valid Department ID."
    - Message Token for "0": Department ID
    And It fulfilled my requirement.

  • Error message for  Unable to connect (BIB-16633)

    Dear All
    I use Oracle Jdeveloper10g (win32), Oracle database10g or 9i (win32 ver). But Failure to connect to OLAP service.
    Can anyone give me what is the error message for BIB-16633.
    Would be really grateful if you could give me a solution as soon as possible.
    Thanks & Regards,
    Mr.Tsang. Hong Kong

    For database versions you need to have at least 9206 for 9i and 10.1.0.4 for 10g. This requires you to apply the 9206 patchset to 9i and the 10.1.0.4 patchset to the 10g base install.
    Please note there are a lot of steps invloved in the patching process and you must make sure you have completed all the steps before creating your OLAP schema. Most problems occur because the patching process is incomplete and the OLAP option is in an invalid state.
    You can check the state of the OLAP option using the following commands in SQLPlus:
    column comp_name format a35
    SELECT comp_name, status, substr(version,1,10) as version
    from dba_server_registry order by modified;
    Once the OLAP option is in a valid state, then you must ensure the OLAPSYS account is unlocked. To test the OLAP environment you can install the BI10G sample schema which will create a new user account called CS_OLAP which contains an Analytic Workspace.
    Hope this helps
    Business Intelligence Beans Product Management Team
    Oracle Corporation

  • Error message for running stored procedure

    Hello expert,
    I got error message for a stored procedure running as follows, will you please tell me what that error is? what is the reason for that error? appreciate very much.
    Job name=PROD DWH REPORT MART LOAD.1
    Job owner=DEVTEAM
    Job type=SQL Script
    Job status=Error
    Occurred At=Aug 9, 2011 5:26:29 AM EDT
    Target Name=proddw(Database Instance)
    Job output=
    Command:Output Log
    SQL*Plus: Release 10.2.0.3.0 - Production on Tue Aug 9 03:00:07 2011
    Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
    SQL> SQL> SQL> SQL> Connected.
    SQL> SQL> SQL> SQL> SQL> SQL>
    TO_CHAR(SYSDATE,'DD-
    09-aug-2011 03:00:07
    SQL> SQL>
    Many Thanks,

    What error? I can't see an error.

  • How to customize error message using oraus.msg file?

    Hi,
    Is there a way to modify the oracle error message (for example: instead of ORA-01481: invalid number.. we modify it to "hello ! use a valid format.." ), is it possible using the oraus.msg file if not is there a solution?
    Many thanks

    968420 wrote:
    Hi Gauyav and Keith,
    i thak you for your quick responses , but i want the customized message to be displayed wherever the oracle error appears (in oracle forms screens , sql tool requests, ) not only in pl/sql code,That is a really bad idea
    {message:id=1007020}
    It would render the database completely unsupportable by anyone, and based on the quality of exception handling that is generally seen on these forums would result in databases that simply don't work.
    SQL> declare l_dummy number;
      2  begin
      3    select null into l_dummy from dual
      4    where 0 = 1;
      5  exception when others then
      6    raise_application_error(-20666, 'It doesn''t work!');
      7  end;
      8  /
    declare l_dummy number;
    ERROR at line 1:
    ORA-20666: It doesn't work!
    ORA-06512: at line 6
    as we've a lot of forms screens and it's not possible to modify all of them.These are strange kinds of forms that it is possible to create a lot of them but not possible to modify them.
    Is there a solution for this?Fix the forms.

  • Pop up error messages for failed custom validation

    I am using jdev-10.1.3.4
    My application is in ADF BC
    I am writing custom validation through managed bean, I want pop-up error message for this failed validation.
    My problem scenario is:
    I had some list box as "status"-when this status changes to failed then the other field namely "closed date" should become madantory and also date in closed date field can't be in future.I am able to have all this validation through managed bean and also able to use af:messages through which i am able to print error message on the top of the form, but i am not able to give pop up error message for this failed validation.
    I had gone thru jdev guide but there is nothing like what i am asking.
    it would be of great help if someone can give me some example also.
    thanks in advance.

    ADF has global setting where you can configure the way messages are shown to user:
    You can make this setting in adf-faces-config.xml
    The <client-validation> element controls how client-side converters and validators are run.
    Three values are supported:
    "INLINE": validation is shown inline in a page (the default)
    "ALERT": validation is shown in an Javascript alert
    "DISABLED": validation is only handled on the server
    IN your case, set it to 'ALERT'.

  • Customised Error Message for ESS-MSS Applications

    Hello All,
    Currently, if there are any errors in the ESS/MSS transactions, we get the 503 error with lot of irrelevant data to the users. We have a basic html page which says, "There is a issue-Please contact XXXX".
    Is there a way to replace the standard error message with this html page ?
    PS: I am not talkign about the "Dispatcher Running" or "Application Stopped" messages, Please do not point me again to SAP Help website which doesn't answer my query. THIS IS ABOUT REPLACING THE STANDARD ERROR MESSAGES FOR ESS/MSS APPLICATIONS.
    Any help is much appreciated.
    We are on EP 7.01 SP3 (ESS 1.41)
    -Raj

    Hi Raj
    Let me clarify the difference between ESS and MSS errors and JAVA stack errors
    A "503 Service  not available" is not an ESS or MSS error - this is the thrown by the stack (possibly while navigating
    in ESS or MSS)
    The only information I have available in the case of java stack errors is to follow
    http://help.sap.com/saphelp_nw70/helpdata/en/9a/e74d426332bd30e10000000a155106/frameset.htm
    Whcih indicates how to customize stack errors  like 404 or 500
    Lastly you can also decide to hide the stack trace as per KBA 1596212
    To modify an ESS or MSS message this may require modification to front and back-end HCM application - usually
    ESS gets error information based on back-end errors example "fill in all required fields"
    Hope this helps

  • How to create a error message for Deleted batch while creating a PO

    Hi ,
    Can any body tell me how to create error message for a deleted batch while creating a PO in ME21n,
    when a PO is created for a deleted batch at GI &GR lebel it is showing  a error message,
    but i want to show a error message while doing the PO creation.
    Thanks,
    Sachhi

    in badi  me_process_po_cust u can  put this message
    METHOD if_ex_me_process_po_cust~check.

  • For weeks I have been viewing a doggy day care via their web cam.  This weekend I upgraded to Lion and have been unable to view the center since.  I get an error message for java webcam class not found.  All of my software is up to date--suggestions?

    For weeks I have been viewing a doggy day care center via their web cam.  This weekend I upgraded to Lion and have been unable to view the center.  I get an error message for Java plug-in 1.6.0_29 ....webcam class not found.  Any suggestions on how to fix this?

    Sorry, don't know what else to suggest unless there's a URL to the problem stream that someone here can try. Otherwise we can't test it to try and determine what might be wrong.
    BTW, make sure they're testing it with a Mac, not with a Windows system. If they test only with Windows, what they say is or is not working doesn't mean much.
    Regards.

Maybe you are looking for

  • JCO.Client: null

    Hi,    When and why does this occur and how to resolve this? Exception: Exception: com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException: Error connecting using JCO.Client: null Thanks Sumathi

  • Call on update module without addition "in update task"

    Hi, folks! Could anyone please explain the behaviour of an update module that is called without addition "in update task" with regards to transactionality and locking? Where is the processing carried out - in the dialog step, I guess? Does a COMMIT W

  • Updates stopping halfway through

    Hey everyone, I'm trying to get the "GarageBand Instruments and Apple Loops" update for GarageBand which is 1.2 gb all together. The problem that I'm getting is that the update quits halfway through and when I try to do the update again it starts ove

  • HD Sony Video .m2ts.  Can I import them into iMovie for editing?

    Hi I have all my video files stored on a hard disk.  I am thinking of buying a new MAC and want to know if iMovies can import .m2ts HD video for editing and playback?  I see from support section that its ok straight from the camera but what about my

  • Compiling k9copy-2.3.8-3 fails

    error code: /tmp/packerbuild-0/k9copy/k9copy/src/k9copy-2.3.8-Source/src/import/k9avidecode.h:32:91: error: 'AVFormatParameters' has not been declared make[2]: *** [CMakeFiles/k9copy.dir/k9copy_automoc.o] Error 1 make[1]: *** [CMakeFiles/k9copy.dir/a