Apex 4.0.1 Error handling

Hi All,
Do we need plug in to handle user friendly error message instread of throwing ORA- error to user?

You could try this idea..
http://www.talkapex.com/2010/09/custom-error-messages-in-apex.html
or view a thread that talks about this in the Forum:
How to Customize Error Messages?
Thank you,
Tony Miller
Webster, TX
On the road of life...There are 'windshields', and there are 'bugs'
(splat!)
"Squeegees Wanted"

Similar Messages

  • Error Handling subtab missing in APEX 4.2 during update page.

    Does anyone know if error handling page is replaced by something else in APEX 4.2. I can’t see error handling sub tab when I go for update of any existing page. It used be below page attribute at the upper right corner in earlier version.

    Hi,
    I just checked this on apex.oracle.com and can see both the 'Error Handling' 'sub tab' and the relevant region on the page with attributes for 'In-Line Error Notification Text' and 'Error Handling Function'. This is on the 'Edit Page' page in the builder (4000:4301). Is this the page you are on and are you still not able to see this?
    Regards,
    Anthony

  • Apex 4.1 Error handling question

    Apex 4.1
    Hi There,
    Just had a query regarding error handling. As per Apex documentation we can add more information to our error messages. I wanted to add custom text and also the actual Ora or any other message
    E.g
    begin
      if 1=1 then
        l_error := 1/0;
    end if;
    exception
    when others then
        APEX_ERROR.ADD_ERROR (
        p_message          => 'Error1',
        p_additional_info  => 'Test1',
        p_display_location => apex_error.c_inline_in_notification);
    end;Wanted to know, if we want to add the actual error message also, what do we need to add to the ADD_ERROR procedure? I wanted to record the sqlerrm message.
    Thanks

    The only problem with the example was I don't think it handles not null constraints real well. Usually have a constraint name like 'SYS_SOMENUMBER'. So as a result, the extract_constraint_name is not successful.
    I handled this by doing the following:
    if l_constraint_name IS NULL AND p_error.ora_sqlerrm IS NOT NULL THEN
         --NOT NULL constraints don't display the constraint name in the error, find another way
        --Added check for ora_sqlerrm as if there is a page validation, it still enters the function, but with no sqlerrm
            declare
                l_cons_split APEX_APPLICATION_GLOBAL.VC_ARR2;
                l_owner user_constraints.owner%type;
                l_table_name user_constraints.table_name%type;
                l_column_name user_cons_columns.column_name%type;
                l_table_column varchar2(400);
            BEGIN
                --get the section enclosed in parenthesis
                l_table_column := regexp_substr(p_error.ora_sqlerrm, '\([^)]*\)');
                --remove parenthesis and quotes
                l_table_column := regexp_replace(l_table_column, '[(")]');
                --split the data by period
                l_cons_split := apex_util.string_to_table(l_table_column, '.');
                --determine the constraint name by querying user_constraints
                l_table_name := l_cons_split(l_cons_split.COUNT-2);
                l_table_name := l_cons_split(l_cons_split.COUNT-1);
                l_column_name := l_cons_split(l_cons_split.COUNT);
                select uc.constraint_name into l_constraint_name
                from user_constraints uc, user_cons_columns ucc
                where uc.constraint_name = ucc.constraint_name
                and uc.owner = ucc.owner
                and uc.table_name = l_table_name
                and ucc.column_name = l_column_name
                and get_search_condition(uc.constraint_name, uc.owner) like '%IS NOT NULL%'; --gets the search condition as varchar
            END;
        END IF;{code}
    That's slightly off topic, but just thought i'd mention it :)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Apex Modal Page (Skillbuilders) error

    hello,
    I have an issue. I have a page (IR) and when click link it open a modal (skill builder) page. when I try to submit the page then i get this error. An unexpected internal application error has occurred. Please get in contact the Support and provide reference# for further investigation. i tried on firefox and IE8. it work fine sometimes but mostlly getting this error. and getting same error on both. Any help will be greatful. Thx.
    Edited by: Irha10 on 07-Mar-2013 02:25

    Irha10 wrote:
    I run again and getting same error and after debugging I found this below.
    Logging exception in final_exception_handler: Sqlerrm: ORA-20987: APEX - An unexpected internal application error has occurred. Please get in contact the Support and provide reference# for further investigation. Backtrace: ORA-06512: at "APEX_040200.WWV_FLOW_ERROR", line 622 ORA-06512: at "APEX_040200.WWV_FLOW_ERROR", line 903 ORA-06512: at "APEX_040200.WWV_FLOW_VALIDATION", line 915 ORA-06512: at "APEX_040200.WWV_FLOW", line 8709.
    any idea please?Yes. Read what Scott wrote again. You still have custom error handling in place which is throwing a way too generic message.
    From the backtrace it would seem that there is an error occuring in a validation and if you're debugging then you should be able to see what validation is causing this problem. It could be as simple as trying to do a TO_NUMBER on some characters.
    But try and disable your custom error handling so you can properly debug this.

  • Error handling function: ORA-20001: get_dbms_sql_cursor error:ORA-00942: table or view does not exist  is not trapped. Why?

    Why APEX 4.1 Error handling function does not trap  the error of missing table?
    Say, I create simple application with single IR report page and I also assign standard simple error handling function.
    Function works perfectly, except but this case:
    If I just drop a table used by report page and then refresh the page I am getting usual APEX error message:
    ORA-20001: get_dbms_sql_cursor error ORA-00942: table or view does not exist
    and error handling function is not invoked at all.
    Is this a feature or a bug?

    Hi,
    Check the corrections given in the note 990764:
    Reason and Prerequisites
    Up to now, using a characteristic with its own master data read class as the InfoProvider was not supported. This is now released but it is not available for all modelings. Using the attributes in the query is not supported for characteristics that have their own master data read class. Using the attributes in the query causes a termination. The following errors may occur in this case:
    ORA-00942: table or view does not exist
    Fehler in CL_SQL_RESULT_SET  Include NEXT_PACKAGE
    RAISE_READ_ERROR in CL_RSDRV_VPROV_BASE
    Solution
    SAP NetWeaver 2004s BI
               Import Support Package 11 for SAP NetWeaver 2004s BI (BI Patch 11 or SAPKW70011) into your BI system. The Support Package is available once Note 0914305 "SAPBINews BI 7.0 Support Package 11", which describes this Support Package in more detail, has been released for customers.
    In urgent cases you can implement the correction instructions.
    The correction instructions contain the tightened inspection for characteristics.
    Regards,
    Anil Kumar Sharma .P

  • Error Handling in Forms

    Dear all,
    we are using oracle developer suite 10g r2 with oracle database 10g r2 against windows server 2003.
    Error handling is a very big issue.
    i try to do the following, just correct me, or make the trigger more efficient.
    i face unexpected messages, like a message two time displayed, sometime important message never displayed.
    i just set the :system.message_level =20 in the when-new-form-instance trigger.
    and create on-error trigger like below
    declare
    errcode number:=error_code;dbmserrcode number;dbmserrtext varchar2(200);
    formtxt varchar2(200);
    errtype varchar2(3);
    begin
    --------- user defined database exceptions errors raised by --RAISE_APPLICATION_ERROR
    IF DBMS_ERROR_CODE in (-20738,.......) then
    raise form_trigger_failure;
    end if;
    if error_code=50017 then
    message('duration must be between 0 and 23');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif
    error_code=40202 then
    clear_message;
    message('please provide the required fields.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif error_code=50022 then
    clear_message;
    message('time must be in the correct format.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    if error_code in (40509,40508) then
    dbmserrcode:=dbms_error_code; dbmserrtext:=dbms_error_text;
    if dbmserrcode=-1438 then
    clear_message;
    message('your number is too large.try again.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif dbmserrcode=-1400 then
    clear_message;
    message('your forgot to provide a value.try again.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif dbmserrcode=-2291 then
    clear_message;
    message('header is not found for this insertion.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif dbmserrcode=-1 then
    clear_message;
    message('record already exists');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    else
    clear_message;
    message(error_code||' : '||error_text);message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    else
    clear_message;
    message(error_code||' : '||error_text);message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    exception
    when others then
    if dbms_error_code=-20738 then
    clear_message;
    message('Error: absent or later record errror from the database trigger.);
    raise form_trigger_failure;
    elsif .....
    esle
    clear_message;
    message(error_code||' : '||error_text);message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    end;any suggession?
    Regards

    i must come with a plsql code which handle every error and suppress unnecessary messages.Good luck with that. No matter how well thought out or planned, you're not going to be able to take all scenarios into account. The design of an exception handler takes time to address all possible scenarios you want handled and even then, you're not likely to handle every situation in the beginning.
    could we implement the oracle ebusiness error handling procedures here in our application?if yes, then where could we find that procedure?>
    I've dug through that code and it is not a thorough as you think it is. It handles specific situations and then defaults the rest. It is a good model for your own exception handler, however. That is what I used it for. :) I don't recall which library it is in, but I'll look around and if I find it, I'll post it.
    I agree with Andreas's comment...
    Simply remove your ON-ERROR-trigger, then you have a default. That's nothing better or worse than what apex has.I'm not too familiar with Apex; I've worked with it, but it's been a little while. Even with Apex, you're going to have to develop a customized Exception Handler so more intuitive or application specific messages are displayed in response to an exception.
    As to Andreas's comment...
    For your own error-handling... The "simplest" way in my eyes is create your own error-table where you have appropiate columns for the error-code and the error-type (FRM,ORA,Whatever), then in your ON-ERROR-trigger read the appropiate record from that table and show the error. You could also have a flag in your table which decides what to do with a specific error (Show as Message, Show as Alert, Don't show at all) and react accordingly.This is exactly what we implemented in our application. We created a set of tables that contain all of the Oracle Runtime errors and their attributes (Error Type, Severity Level, etc). Then we wrote a standard On-Error trigger that is subclassed to all of our forms that calls a Library "On_Error" package. This package evaluates the exception raised, compares it to the database entry for the error and then displays an appropriate message depending on the Severity Level, Error Type (ORA or FRM) and Message Type (Informational, Error, Caution) and we display the message in either the Status Bar, Note Alert, Caution Alert or Stop Alert or it is supressed. If an error is not found in the table, then it is displayed in a Stop Alert as an "Unhandled Exception." The second table I mentioned contains all of the messages used by our application and is cross referenced with the table that contains the Oracle messages. By simply assigned one of our messages to an Oracle message - our package will display our message instead of the default Oracle Message. Yes, this took sometime to build and test and once implemented, we spent another couple of months perfecting it, but now it is pretty solid and we haven't had to modify it in over a year.
    While this level of complexity may be overkill for your application, it does offer the greatest flexibility in the long-run. Also, if your application must support multiple languages, having all of your messages in a table make internationalization extremely easy. :)
    The point of all this, is that no matter which system you use (Forms, Apex, or Java) you will still need to invest some time into designing an Excpeiton Handling method for your application and then implement it accross the application. This is not something you can develop in a short period of time and it will not be perfect in the beginning. However, in the long-run, you will be happy you spent the time up-front to build a flexible and robust Exception Handling system.
    Craig...

  • Error handling in master detail form

    Hi Guys,
    Apex 4.2.1
    I use the custum error handling of apex to customize the errror message.
    I add a row in the detail form with a dupicate key which is handled by the error function
    after submiiting the master record the error message is correct displayed but the row which generates the error is gone from the details.
    How to keep the record in the details visible?
    Thanks

    Hello 942793 -- Do you have a name / nickname? -- We still don't know how to address you,
    Say, could you tell us -- because sometimes different versions have different capabilities:
    Full APEX version number,
    Full database version number,
    APEX web browser architecture (EPG, OHS, or APEX listener)
    Browser(s) and version(s) used,
    Operating System with version number and architecture (32/64 bit),
    [If you mentioned these before we don't have access to that info in this thread.]
    Also, are you using ARP (Automatic Row Processing) for this Master-Detail or have you programmed your own updates?
    Did you use an APEX wizard to create the Master-Detail or have you written you own code for the Master-Detail?
    To the problem:  In short, APEX is ensuring update consistency by preventing an update of a record/row that has changed since the code retrieved it.  So, one needs to figure out where/why it changed and what to do about it.
    ?  Is this Master-Detail part of you application fairly simple?  Could you put just that part out on apex.oracle.com for folks to look at?  That can speed resolution of these, sometimes difficult, update problems.
    Regards,
    Howard

  • Error Handling for Dynamic Actions (4.1.1)

    Hello
    I'm trying to create a function to handle all possible errors but the errors generated by DA are not being caught.
    Is it possible to caught them? How?
    My function is based in:
    http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-1/
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_error.htm#autoId4
    and I'm making my tests in apex.oracle.com
    Thanks

    Hi,
    there is no APEX JS function which you could use to intercept the error display. But you might be able to overwrite the "window.alert" JS function which is used to show the error with your own implementation. This function could check the text for some patterns and then decide what to show to the user. I haven't tried this but
    var originalAlert = window.alert;
    window.alert = function( pMessage ) {
      if ( pMessage ... some check comes here ... ) {
        originalAlert( "My new message" );
      } else {
        originalAlert( pMessage );
    };might work.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • User friendly error handling in a trigger

    Hello,
    How can I have user freindly error handling when am using a trigger??
    In the trigger I through an exception such I use if statment in the tigger
    If ( condition) then
    RAISE_APPLICATION_ERROR(-20001, ' Error message');
    end if;How can I display this message in uer friendly way??

    See Patrick's posts here:
    http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-1/
    http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-2/

  • Apex 4.1 Custom error function and page rendering

    Hi
    I have setup a demo application at http://apex.oracle.com/pls/apex/f?p=19820:1 which is a simple testing application for testing of the apex_error_handling_example function Patrick wolf put into Oracle documentation. I have setup a error on the page rendering of page 2 in the application. The error process contain this simple error code declare
    v_id number;
    begin
    select 'x' as one into v_id from dual;
    end;
    which generate plsql numeric or value error. The process is running before regions on page rendering on page 2. I have also created the same error process on page processing before DML processing on the page. When i insert apex_error_handling_example into the application level and run the application the error is not caught and the page is rendered as nothing was wrong. When the page is submitted the error function is executed and work correct.
    When i remove the error function from the application the error is caught and displayed on the APEX error page with the detail link for drill down to show more about the error.
    Any which can tell what is wrong with the setup i have done. The error function apex_error_handling_example setup is simply a copy/paste from the documentation with some few debug message put into a logging table.
    kindest regards
    jon

    Hi
    Yes, when you submit the page the page processing is displaying the error message inline, but it does not show the same error on page rendering for page 2, if i remove the custom error function it will show the error on APEX separate error page. The debug output from the page 1 is as following:
    0.12084     0.00345     ...metadata, fetch items     4     
    5
         0.12431     0.00146     Show page template header     4     
    2
         0.12576     0.00152     Rendering form open tag and internal values     4     
    2
         0.12728     0.00034     Computation point: After Header     4     
    1
         0.12767     0.00040     Processes - point: AFTER_HEADER     4     
    1
         0.12801     0.00508     ...Process "Fetch Row from DEMO_CUSTOMERS" - Type: DML_FETCH_ROW     4     
    8
         0.13312     0.00242     ...Execute Statement: begin begin select ROWID,"CUSTOMER_ID","CUST_FIRST_NAME","CUST_LAST_NAME","CUST_STREET_ADDRESS1","CUST_STREET_ADDRESS2","CUST_CITY","CUST_STATE","CUST_POSTAL_CODE","PHONE_NUMBER1","PHONE_NUMBER2","CREDIT_LIMIT","CUST_EMAIL" into wwv_flow.g_column_values(1),wwv_flow.g_column_values(2),wwv_flow.g_column_values(3),wwv_flow.g_column_values(4),wwv_flow.g_column_values(5),wwv_flow.g_column_values(6),wwv_flow.g_column_values(7),wwv_flow.g_column_values(8),wwv_flow.g_column_values(9),wwv_flow.g_column_values(10),wwv_flow.g_column_values(11),wwv_flow.g_column_values(12),wwv_flow.g_column_values(13) from "OLE1923"."DEMO_CUSTOMERS" where "ROWID" = :p_rowid; end; end;     4     
    4
         0.13552     0.00038     Computation point: Before Box Body     4     
    1
         0.13590     0.00032     Processes - point: BEFORE_BOX_BODY     4     
    0
         0.13621     0.00051     ...Process "gen error" - Type: PLSQL     4     
    1
         0.13672     0.00142     ...Execute Statement: begin declare v_id number; begin select 'x' as one into v_id from dual; end; end;     4     
    2
         0.13814     0.00052     Add error onto error stack     4     
    1
         0.13866     0.00048     ...Error data:     4     
    1
         0.13914     0.00048     ......message: ORA-06502: PL/SQL: numeric or value error: character to number conversion error     4     
    1
         0.13962     0.00049     ......additional_info: ORA-06502: PL/SQL: numeric or value error: character to number conversion error     4     
    1
         0.14011     0.00048     ......display_location: ON_ERROR_PAGE     4     
    1
         0.14059     0.00047     ......is_internal_error: false     4     
    1
         0.14106     0.00073     ......ora_sqlcode: -6502     4     
    1
         0.14179     0.00048     ......ora_sqlerrm: ORA-06502: PL/SQL: numeric or value error: character to number conversion error     4     
    1
         0.14227     0.00049     ......error_backtrace: ORA-06512: at line 6 ORA-06512: at "SYS.DBMS_SYS_SQL", line 1926 ORA-06512: at "SYS.WWV_DBMS_SQL", line 966 ORA-06512: at "SYS.WWV_DBMS_SQL", line 992 ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 649 ORA-06512: at "APEX_040100.WWV_FLOW_PROCESS", line 129      4     
    1
         0.14276     0.00050     ......component.type: APEX_APPLICATION_PAGE_PROCESS     4     
    1
         0.14326     0.00079     ......component.id: 64815543714133426115     4     
    1
         0.14405     0.00058     ......component.name: gen error     4     
    1
         0.14463     0.00067     ...Execute Error Handling Callout defined on Page or Application Level     4     
    1
         0.14530     0.00184     ...Execute Statement: begin declare l_error wwv_flow_error.t_error; begin l_error := wwv_flow_error.g_error; wwv_flow_error.g_error_result := apex_error_handling_example ( p_error => l_error ); end; end;     4     
    3
         0.14714     0.00055     ......Values changed by callout:     4     
    1
         0.14769     0.00049     .........message: MY.....MY ERROR PL/SQL: numeric or value error: character to number conversion error     4     
    1
         0.14818     0.00065     .........display_location: INLINE_IN_NOTIFICATION     4     
    1
         0.14883     0.00331     Region: Form on DEMO_CUSTOMERS     4     
    5
         0.15214     0.00174     Item: P2_ROWID NATIVE_HIDDEN     4     
    3
         0.15388     0.00090     Item: P2_CUSTOMER_ID NATIVE_NUMBER_FIELD
    The debug output show that the custom error function is running and changing the display location from ON_ERROR_PAGE to INLINE_IN_NOTIFICATION, but there is something going wrong in this processing.
    jon

  • Error Handling on Insert

    I am not very good at error handling in APEX. Currently I have a problem where, if a user tries to insert a row in a table and there is already a row with the same primary key, they get an APEX error message with a little OK button. When they press the OK, it loops right back to the same error message. The only way out of this is to use the browser back button drop down and go back two pages. Note: the page that generates the error is a page that automatically submits itself via a simple Javascript. So, how do I check to see if there is going to be a primary key constraint error, display a message and go back to the page where the user choose the data that caused the duplicate key error? The error is generated out of the Automatic Row Processing process when the page is submitted.
    Edited by: DaleB on Feb 17, 2009 6:33 AM

    Hi,
    I think it would depend on the sequence of events that are gone through to create the record. I have done something similar where the user makes one or more selections on page items, then clicks on a Day Link in a calendar - this passes values (through a URL rather than a Submit) to a second page which automatically submits the page to create a new record to show in the calendar.
    I assume that your user does something on, say, Page 1, which is submitted and transfers to, say, Page 2, which automatically submits to create record? Or is this passed by a URL as in my case?
    If you submit Page 1 first, you could perform validation on Page 1. If you pass the items using a URL, you could have a conditional branch on Page 2 that is in the "Before Header" branch point that branches to a page that shows an error message and provides a button to return to Page 1 - the insert, therefore, never takes place as the page is never loaded.
    Andy

  • 4.1 Error Handling Confusing

    Hi Everyone,
    I have a few pages running under 4.1 that are generating errors that look like this:
    Error     Error processing condition.
    ORA-01403: no data found
    Technical Info (only visible for developers)
    is_internal_error: true
    apex_error_code: APEX.CONDITION.UNHANDLED_ERROR
    ora_sqlcode: 100
    ora_sqlerrm: ORA-01403: no data found
    error_backtrace:
    ORA-06512: at "SYS.WWV_DBMS_SQL", line 904
    ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 588
    ORA-06512: at "APEX_040100.WWV_FLOW_CONDITIONS", line 148
    It is very confusing to me as to what component on the page is triggering this error. Does anyone have any insight on how to decipher this?
    Thanks,
    Jeff

    Hi Patrick,
    I was going through your post http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-1/ for error handling. I am able to handle many errors but how do I handle this error in function apex_error_handling_example. when such error occurs it does not even reach till this function defined at application level
    I have report using dynamic pl/sql returing query. If my parameters are invalid then query of report fails with error
    "failed to parse SQL query:
    ORA-02019: connection description for remote database not found"
    I tried to check if error reaches till apex_error_handling_example by inserting p_error.apex_error_code in some dummy table inside this function but whenever this error occurs no records created in dummy table
    If i use exception handling at query level of report then it logs error as "APEX.REGION.UNHANDLED_ERROR"
    Is there any way I can handle/capture this error at application level and display custom message to user ?
    I am using apex 4.1
    Pls help/advice.

  • Latest Error Handling for Dynamic Actions

    Is there any documentation on the Latest Error Handling for Dynamic Actions?

    BillC,
    Interesting that I was looking around for the same thing after seeing a Foreign Key violation in my application.
    I found this article by Patrick Wolf:
    APEX 4.1 – Error Handling Improvements – Part 1
    http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-1/
    I believe you need to be on 4.1 or later though.
    Thanks,
    Joe

  • Page Error handling question..

    Using APEX 4.1.1.. Hosted instance.. I am testing various error handling functions (Oracle's standard one from documentation and others). I have a page with a standard report, I have defined the page to have an associated error handling function. On the report I have a calculated column that should error out due to a division by 0 error..
    Now what I had thought was, the page would handle the error more gracefully than previous version, in that it would show the custom error message I define in the constraints table...
    Is there a section of the documentation I am missing that shows at what point the error handling function kicks in and where we need to invoke it otherwise?
    Thank you,
    Tony Miller
    Dallas, TX

    Interesting. Had never considered this aspect.
    Just did a couple of tests - so it must only come into play from the PL/SQL engine.
    Created an sql report:
    select floor(dbms_random.value(1,10))/0 num
    from dual
    connect by level <= 10But the error function never gets hit.
    begin
    for i in (select floor(dbms_random.value(1,10))/0 num
    from dual
    connect by level <= 10) loop
    htp.p(i.num);
    end loop;
    end;Function gets hit.
    Just looking at the docs, there doesn't appear to be any indication of processing point.
    But from Patrick's blog:
    This includes errors raised by validation, process, … and all errors raised by the Application Express engine itself.http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-1/
    I guess an SQL report isn't considered as an 'all errors raised by the apex engine'.

  • 3.2 to 4.1 Upgrade - Error Handling for Unavailable Database Links

    Hi,
    I'm having a 3.2 -> 4.1 upgrade issue related to error handling for failed database links.
    I have a conditional Exists button on a page that has a SQL query to linked tables. However, for the 10 minutes every day where the target of the database link is getting a cold backup, the query fails. In the old 3.2 apex I simply got an error inside the region where the button is located but otherwise the page was still visible:
    "Invalid exists/not exists condition: ORA-02068: following severe error from MYDBLINK ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist"
    However, in apex 4.1.0.00.32 I get the following unhandled error, and clicking "OK" takes me to the edit page when logged in as developer.
    i.e., the page can't be run at all while the database links are failing in this one region.
    Error Error processing condition.
    ORA-12518: TNS:listener could not hand off client connection
    Technical Info (only visible for developers):
    is_internal_error: true
    apex_error_code: APEX.CONDITION.UNHANDLED_ERROR
    ora_sqlcode: -12518
    ora_sqlerrm: ORA-12518: TNS:listener could not hand off client connection
    component.type: APEX_APPLICATION_PAGE_REGIONS
    component.id: 4
    component.name: Current Alerts
    error_backtrace:
    ORA-06512: at "SYS.WWV_DBMS_SQL", line 1041
    ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 687
    ORA-06512: at "APEX_040100.WWV_FLOW_CONDITIONS", line 272
    General users see this:
    Error Error processing condition.
    ORA-01034: ORACLE not available ORA-02063: preceding line from MYDBLINK
    clicking "OK" takes user to another page, not sure how apex decides which, but not a concern at the moment.
    I've done a search and read the page http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-1/ but the new apex error handling isn't clear to me, and I don't know if the apex_error_handling_example provided on that page would be applicable to this situation.

    Thanks Patrick.
    The PL/SQL Function Body returning boolean condition with:
    begin
        for l_check in (
          SELECT 1
           FROM myview@MYDBLINK
          WHERE ... ) loop
            return true;
        end loop;
        return false;
    exception when others then
        sys.htp.p('Invalid exists/not exists condition: ' || sys.htf.escape_sc(sqlerrm));
        return false;
    end; Resulted in a similar issue:
    Error Error processing condition.
    ORA-04052: error occurred when looking up remote object MYLINKUSER.myview@MYDBLINK
    ORA-00604: error occurred at recursive SQL level 3
    ORA-01033: ORACLE initialization or shutdown in progress
    ORA-02063: preceding line from MYDBLINK
      Technical Info (only visible for developers)
    is_internal_error: true
    apex_error_code: APEX.CONDITION.UNHANDLED_ERROR
    ora_sqlcode: -4052
    ora_sqlerrm: ORA-04052: error occurred when looking up remote object MYLINKUSER.myview@MYDBLINK
    ORA-00604: error occurred at recursive SQL level 3
    ORA-01033: ORACLE initialization or shutdown in progress
    ORA-02063: preceding line from MYDBLINK
    component.type: APEX_APPLICATION_PAGE_REGIONS
    component.id: 4
    component.name: Current Alerts
    error_backtrace:
    ORA-06512: at "SYS.WWV_DBMS_SQL", line 904
    ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 588
    ORA-06512: at "APEX_040100.WWV_FLOW_CONDITIONS", line 148However, I created a view with the same query:
    CREATE OR REPLACE VIEW v_localview (ALERT_1)
    AS
    SELECT 1
      FROM myview@MYDBLINK ...then change the condition to look at the local view:
    begin
        for l_check in (
          select alert_1 from v_localview ) loop
            return true;
        end loop;
        return false;
    exception when others then
        sys.htp.p('Invalid exists/not exists condition: ' || sys.htf.escape_sc(sqlerrm));
        return false;
    end;As a view is simply a query I'm surprised this should make any difference but it now looks similar to the 3.2 error, inside the region, when the linked database gets its morning cold backup, and this is fine:
    Invalid exists/not exists condition: ORA-12518: TNS:listener could not hand off client connection

Maybe you are looking for

  • RV180 can't connect site-2-site with osx server

    Trying to connect an rv180 to an os x server Getting the following (have redacted IP's etc) Thu Oct 31 01:34:39 2013 (GMT +0000): [router970EB8] [IKE] INFO:  accept a request to establish IKE-SA: redacted.somwhere.com Thu Oct 31 01:34:39 2013 (GMT +0

  • I cannot install itunes as an old version of bonjour cannot be removed

    I tried to upgrade to a new version of iTunes but it failed and i had problems with the bonjour software. I have no managed to uninstall everything except Bonjour. When i try and install iTunes, an error message appears saying an old version of Bonjo

  • Rename existing Exchange 2010 database in DAG

    Hello, I want to rename one existing database on our exchange 2010 server. This database is in DAG and hosting around 1000 users. So not possible to create a new mailbox database and move. How can I rename the database? After renaming it, what will h

  • The Table used to store the Tax Percentage

    Hi, Do U know the table that is used to store the Tax Percentage when a Sales Order is Saved. Also when a Billing is done usually the Tax Percentage will be taken from the relating Sales Order detail, does the Tax Percentage get saved in a Table at B

  • TS1424 iTunes has billed me for music I didn't want!

    I was listening to some snippets of music and I must have 'hovered' the cursor over something by mistake (can be a pain on a Mac) - I most certainly did not click it - and a download started. I stopped it immediately so I don't have the music. But to