Custom error in SQL%BULK_EXCEPTIONS

hi
I have a trigger that raises -20101,'bla bla'
I'm doing a forall ... save exceptions and the exception is caught but I can't manage to get the text with sqlerrm(-SQL%BULK_EXCEPTIONS(i).ERROR_CODE because -20101 it's a custom error.(i only get ORA-20101:)
I thought that BULK_EXCEPTIONS(i) represents an EXCEPTION (the type), but how to get the message from it,not using SQLERRM(-code)?
any workaround?
Thanks

Hi,
You could try DBMS_UTILITY.FORMAT_ERROR_BACKTRACE.
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_util.htm#sthref7777
Edited by: hoek on Jul 24, 2009 12:01 PM After reading Rob's post a sincere 'whoops' seems justified

Similar Messages

  • Getting the constraint name with sql%bulk_exceptions

    Hello folks,
    Is there any way to get the constraint name that was violated using sql%bulk_exceptions.
    I've a parent table and it's two children tables. When I try to delete from parent using forall, save exceptions, I want to know what constraint violated at what iteration of a bulk operation.
    I've following script.
    set serveroutput on
    drop table chld;
    drop table chld2;
    drop table prnt;
    create table prnt(n number primary key);
    insert into prnt select level from dual connect by level<11;
    create table chld(cn number references prnt(n));
    insert into chld select level from dual connect by level<3;
    create table chld2(cn number references prnt(n));
    insert into chld2 select level*3 from dual connect by level<3;
    select * from prnt;
    select * from chld;
    select * from chld2;
    commit;
    declare
      type t_prnt_obj is table of prnt.n%type index by pls_integer;
      t_prnt_tab t_prnt_obj;
      l_exp_cnt integer;
    begin
      select n bulk collect into t_prnt_tab from prnt order by n;
      dbms_output.put_line('t_prnt_tab.count -- '||t_prnt_tab.count);
      forall i in t_prnt_tab.first .. t_prnt_tab.last save exceptions
        delete prnt where n = t_prnt_tab(i);
    exception
      when others
      then
        l_exp_cnt := sql%bulk_exceptions.count;
        dbms_output.put_line('Total exceptions:'|| l_exp_cnt);
        for k in 1 .. l_exp_cnt
        loop
          dbms_output.put_line('Error '||k|| ' - Collection Index: '||sql%bulk_exceptions(k).error_index||' - Error Code: '|| sql%bulk_exceptions(k).error_code||' - Message: '||SQLERRM(- sql%bulk_exceptions(k).error_code) );
        end loop;
    end;I get the output as below:
    t_prnt_tab.count -- 10
    Total exceptions:4
    Error 1 - Collection Index: 1 - Error Code: 2292 - Message: ORA-02292: integrity constraint (.) violated - child record found
    Error 2 - Collection Index: 2 - Error Code: 2292 - Message: ORA-02292: integrity constraint (.) violated - child record found
    Error 3 - Collection Index: 3 - Error Code: 2292 - Message: ORA-02292: integrity constraint (.) violated - child record found
    Error 4 - Collection Index: 6 - Error Code: 2292 - Message: ORA-02292: integrity constraint (.) violated - child record foundInstead, I want to get in output with the constraint_name added. Like below:
    t_prnt_tab.count -- 10
    Total exceptions:4
    Error 1 - Collection Index: 1 - Error Code: 2292 - Message: ORA-02292: integrity constraint (GK.CP_FK) violated - child record found
    Error 1 - Collection Index: 1 - Error Code: 2292 - Message: ORA-02292: integrity constraint (GK.CP_FK) violated - child record found
    Error 1 - Collection Index: 1 - Error Code: 2292 - Message: ORA-02292: integrity constraint (GK.C2P_FK) violated - child record found
    Error 1 - Collection Index: 1 - Error Code: 2292 - Message: ORA-02292: integrity constraint (GK.C2P_FK) violated - child record foundIs it possible, if so how do I get it?
    Thanks in advance for you help.
    Girish

    This is phenomenal, Manik. It surely eased the work am doing at the moment.
    Thanks to you and many more to, Tom!
    Cheers!
    Girish

  • Custom Error Pages (Not for PL/SQL Errors)

    Hi,
    How can I make my own error page for when I branch to an invalid page?
    I caught this example:
    http://djmein.blogspot.com/2007/04/custom-error-handling-in-apex.html
    But I beleive it is only for handling exceptions thrown in PL/SQL and this cannot be applied here.
    Anyone know?

    I'm struggling on this also. Anyone have the solution as well?

  • How to show custom error message in WebADI Excel template?

    Hi,
    I've  created a custom Web ADI integrator and associated it with a 'Procedure' based custom interface.
    WebADI Interface API Returns is set to  "Error Message".
    I'm using  raise_application_error(-20001, "Actual Error Message") for invalid rows,but custom error message from PL/SQL  is not populated on the excel template.
    Instead it is showing "SQL exception occurred during PL/SQL upload".
    Am I missing anything? How to show custom error message from Pl/SQL procedure to WebADI Excel template?
    TIA
    Narasimha

    The custom API errors are visible in the BNE log but not on the Excel.
    BNE Log=>
    12/10/13 2:52 PM Web ADI Upload Job 13008 ERROR          BnePLSQLUpload.doUpload: Exception while uploading to PL/SQL API.  Error Code: 20001, Message: ORA-20001: -Please enter CONTAINER_ID -  Enter PO_NO -
    ORA-06512: at "APPS.XXPO_COSTFACTS_WEBADI_PKG", line 264
    ORA-06512: at line 1
    12/10/13 2:52 PM Web ADI Upload Job 13008 ERROR          BnePLSQLUpload.doUpload: Stack trace: java.sql.SQLException: ORA-20001: -Please enter CONTAINER_ID -  Enter PO_NO -
    ORA-06512: at "APPS.XXPO_COSTFACTS_WEBADI_PKG", line 264
    ORA-06512: at line 1
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
      at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
      at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
      at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:202)
      at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1005)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3449)
      at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3550)
      at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4710)
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
      at oracle.apps.bne.integrator.upload.BnePLSQLUpload.doUpload(BnePLSQLUpload.java:284)
      at oracle.apps.bne.integrator.upload.BneSAXUploader.processDeepestLevel(BneSAXUploader.java:2346)
      at oracle.apps.bne.integrator.upload.BneSAXUploader.startElement(BneSAXUploader.java:1182)
      at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:181)
      at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
      at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
      at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
      at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:234)
      at oracle.apps.bne.integrator.upload.BneUploader.processUpload(BneUploader.java:301)
      at oracle.apps.bne.integrator.upload.BneAbstractUploader.processUpload(BneAbstractUploader.java:114)
      at oracle.apps.bne.integrator.upload.async.BneAsyncUploadThread.run(BneAsyncUploadThread.java:140)
    12/10/13 2:52 PM AJPRequestHandler-HTTPThreadGroup-5 WARNING        BneOracleWebAppsContext.getTimeZone CLIENT_TIMEZONE_ID has not been set
    12/10/13 2:52 PM AJPRequestHandler-HTTPThreadGroup-5 ERROR          BneOracleWebAppsContext.getExtraJDBCConnection recieved the same connection as the base connection.  There may be transaction problems.
    How to show the same error in the excel template?
    Here is the package:
    CREATE OR REPLACE PACKAGE BODY APPS.XXPO_COSTFACTS_WEBADI_PKG
    AS
       PROCEDURE upload_data (
                              P_CONTAINER_ID IN VARCHAR2
                            , P_SAIL_DATE IN DATE
                            , P_PO_NO IN VARCHAR2                     
                             ) IS
        --declare
        lv_err_msg      VARCHAR2(240);
        lf_err_flag     NUMBER := 0;
        ln_temp         NUMBER;
        BEGIN
        --------------------- checking for mandatory parameters---------------------------
          IF (P_CONTAINER_ID IS NULL) THEN
             lf_err_flag := 1;
             lv_err_msg := lv_err_msg||'-'||'Please enter CONTAINER_ID - ';
          END IF;
          -------------Validation for Sail Date Format----------------------
          IF (P_SAIL_DATE IS NULL) THEN
             lf_err_flag := 1;
             lv_err_msg := lv_err_msg || ' ' || 'Enter Sail Date - ';
          ELSE
             BEGIN
                SELECT 1
                  INTO ln_temp
                  FROM DUAL
                 WHERE P_SAIL_DATE =  TO_DATE (TO_CHAR (P_SAIL_DATE, 'DD-MON-YYYY'), 'DD-MM-YYYY');
             EXCEPTION
                WHEN NO_DATA_FOUND THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' Enter Sail date in DD-MON-YYYY Format';
                WHEN OTHERS THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' Enter Sail date in DD-MON-YYYY Format'|| SQLERRM;
             END;
          END IF;
          -------------Validation for PO_Number----------------------
          IF (P_PO_NO IS NULL) THEN
             lf_err_flag := 1;
             lv_err_msg := lv_err_msg || ' ' || 'Enter PO_NO - ';
          ELSE
             BEGIN
                SELECT count(1)
                  INTO ln_temp
                  FROM PO_HEADERS
                 WHERE Attribute4 =  P_PO_NO;
             EXCEPTION
                WHEN NO_DATA_FOUND THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' No Oracle PO for Biceps PO#'||P_PO_NO;
                WHEN OTHERS THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' Error getting the Oracle PO for Bicpes PO#'||P_PO_NO||' Error-' || SQLERRM;
             END;
          END IF;
         -----------------------Insert Record----------------------------
         IF lv_err_msg is NULL THEN
         BEGIN
             INSERT
              INTO XXP2P_HW_COST_FACTORS_STG
                     CONTAINER_ID
                    ,SAIL_DATE
                    ,PO_NO
                    , ERROR_FLAG
                    , ERROR_MSG
                   ,CREATED_BY
                    ,CREATION_DATE
                    ,LAST_UPDATED_BY
                    ,LAST_UPDATE_DATE
                    ,LAST_UPDATE_LOGIN              
                VALUES
                     P_CONTAINER_ID
                    ,P_SAIL_DATE
                    ,P_PO_NO              
                    ,lf_err_flag
                    ,lv_err_msg
                  ,FND_GLOBAL.USER_ID
                    , trunc (sysdate)
                    ,FND_GLOBAL.USER_ID
                    , trunc (sysdate)
                    ,FND_GLOBAL.LOGIN_ID              
                  --  commit;
                  DBMS_OUTPUT.put_line
                    '-' || 'After ap_invoices_interface'
            EXCEPTION
            WHEN OTHERS THEN
              ROLLBACK;
              lf_err_flag := 1;
              lv_err_msg  := lv_err_msg || ' ' || 'error loading CONTAINER_ID-' || P_CONTAINER_ID || SQLERRM;
              raise_application_error(-20001, lv_err_msg);
            END;
        ELSE
              raise_application_error(-20001, lv_err_msg);
        END IF;
      END upload_data;                        
    END XXPO_COSTFACTS_WEBADI_PKG;

  • EBS 12.1.3: Unable to throw custom error messages back to Excel document

    Hi Gurus,
    We are on 12.1.3 using Desktop Integration Framework.
    I created a API Procedure based custom Integrator.
    In the PLSQL procedure, I have raise_application_error(-20009, ‘Custom Error’) but this message never comes through.
    It always shows a ‘SQL exception occurred during PL/SQL upload’.
    When it is a success, it shows a green smiley which is fine.
    But when there is a explicit raise_application_error in plsql proc, I would like the error message to flow all the way back to Excel document.
    1.) What should I be using 'API Procedure or API Function' in the Custom Integrator,
    2.) Should it return Error Message or FND Message?
    Has it worked for anyone in 12.1.3?
    Please let me know.
    Thanks
    Vinod

    hi ,Vinod
    Please check the 'API Returns' is setted with 'FND Message Code' in Interfaces define(Step 2 of 5).
    Regards,
    leno

  • ADF Custom error handler not working.

    Hi All,
    i am using jdev version 11.1.1.5.0. i have created one custom error handler class in model layer which extend DcErrorHandlerImpl class.
    and do the entry in Databinding.cpx file
    *<Application ErrorHandlerClass="mypackage.classname"/>*
    i have override getDisplayMessage(BindingContext ctx, Exception ex) method to show SQL Exception which comes from database table trigger.
    code is following-
    package com.in.jagran.view.services;
        import java.sql.SQLException;
        import oracle.adf.model.BindingContext;
        import oracle.adf.model.binding.DCErrorHandlerImpl;
        import oracle.jbo.JboException;
        public class AclasErrorHandler extends DCErrorHandlerImpl {
          public AclasErrorHandler(boolean setToThrow) {
            super(setToThrow);
            System.out.println("Inside Error Handler class");
          public AclasErrorHandler() {
              super(true);
           // this(true);
           * Returns the message that will be reported to JSF for each error that occurs.
           * Returning "null" is the way the custom error handler signals that a given exception
           * should not be reported to the client.
          @Override
          public String getDisplayMessage(BindingContext ctx, Exception ex)
            if (ex instanceof oracle.jbo.ValidationException) {
              return super.getDisplayMessage(ctx, ex);
            else {
              // Extract and return the error message that has to be displayed
              Exception exception = ex;
              String message = "";
              // If this exception is an instance of JboException,
              // try to find the cause by recursing over the eventual causing exceptions
              if (exception instanceof JboException)
                Throwable[] exceptionList = ((JboException)exception).getExceptions();
                while (exception instanceof JboException
                        && exceptionList != null && exceptionList.length > 0)
                  exception = (Exception)exceptionList[0];
                  if (exception instanceof JboException) {
                    exceptionList = ((JboException)exception).getExceptions();
              // *** Special processing of SQLExceptions
              if (exception instanceof SQLException) {
                message = exception.getMessage();
                // Ignore the lines in the error message that indicate the line number in the PLSQL code that the error resulted on.
                int ind = message.indexOf("ORA-06512");
                if (ind > 0)
                  message = message.substring(0, ind);
              // *** If the the reason for the JboException was data creation exception then display the message
              // of the top JboException (i.e. JBO-*****: Invalid numeric value, date format or time format)
              else if (exception instanceof NumberFormatException || exception instanceof IllegalArgumentException) {
                // Report the top exception
                message = ex.getMessage();
              // Otherwise report the message of the lowest exception in the hierarchy
              else {
                message = exception.getMessage();
              return message;
        }but it is not working for me.
    thanks in Advance.

    yes i have used dubugger.
    i have set break point to following line-
    return super.getDisplayMessage(ctx, ex);
    if (ex instanceof oracle.jbo.ValidationException) {
            return super.getDisplayMessage(ctx, ex);   
    }when atttribute validation done like i have attribute of type number and i have done the validation "must be greater than 0" now when i have given negative value control go to above line.
    and i have added following code also in handler class
            @Override
               public void reportException(DCBindingContainer dCBindingContainer,
                                           Exception exception) {
    System.out.println(exception.getMessage());
                       super.reportException(dCBindingContainer, exception);
                   }now when i have done commit operation control go to here and println statement print follwoing error on log window.
    JBO-26041: Failed to post data to database during "Rollback to Savepoint": SQL Statement "null".

  • Auditing and Custom error logging

    Guys,
    Can one of you tell me how can we do auditing in ODI i.e like say if load files how many records the file have and how many we have loaded for each file and how many are
    bad records etc and how many records we have inserted/updated in each table etc.
    Basically some sort of report we need to send in the end as audit report after odi batch run every day
    Can we do this in ODI?
    Is it possible to do sort of custome error logging like what we do in pl/sql, like inserting into error log table when ever oracle error comes or any runtime error which we need to insert into table etc.
    Can we do this kind of error handling ODI?
    Cheers
    Sri
    Edited by: aranisrinivas on 26-Nov-2011 10:13

    Just use below details for your required information
    '<%=odiRef.getPrevStepLog("STEP_NAME")%>'
    '<%=odiRef.getPrevStepLog("SESS_NO")%>'
    '<%=odiRef.getPrevStepLog("MESSAGE")%>'
    '<%=odiRef.getPrevStepLog("ERROR_COUNT")%>'
    You can get more details from below tables.
    1) snp_sess_txt_log -( It holds the scripts used for the task and session details)
    2) snp_sess_task_log-(It holds the time details error msg and all)
    3) snp_sess_task -( it holds the name of the task and technology , context details
    Thanks

  • Issue with SQL%BULK_EXCEPTIONS.COUNT in Oracle 9iR2

    Hi All,
    We are using the Oracle 9i Database
    Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
    PL/SQL Release 9.2.0.7.0 - Production
    CORE 9.2.0.7.0 Production
    TNS for HPUX: Version 9.2.0.7.0 - Production
    NLSRTL Version 9.2.0.7.0 - Production
    I am facing an issue when using SQL%BULK_EXCEPTIONS.COUNT.
    Getting the below error when executing the below dummy block.
    DECLARE
    ERROR at line 1:
    ORA-06531: Reference to uninitialized collection
    ORA-06512: at line 12
    ORA-06510: PL/SQL: unhandled user-defined exception
    DECLARE
    e exception;
    cnt number;
    BEGIN
    NULL;
    raise e;
    exception
    when others then
    if SQL%BULK_EXCEPTIONS.COUNT>0 then
    null;
    end if;
    dbms_output.put_line(1);
    END;
    Request to let me know what is the issue.
    FYI: I never faced this issue in 10gr2 and 11gr2.
    Thanks,
    Madhu K.

    Where are you using a BULK COLLECT with a SAVE EXCEPTIONS that would initialize the SQL%BULK_EXCEPTIONS collection?
    FYI: I never faced this issue in 10gr2 and 11gr2.Are you sure about that? If I run the code you posted in my 11.2 database, I get the same error
    SQL> ed
    Wrote file afiedt.buf
      1  DECLARE
      2    e exception;
      3    cnt number;
      4  BEGIN
      5    NULL;
      6    raise e;
      7  exception
      8    when others then
      9      if SQL%BULK_EXCEPTIONS.COUNT>0 then
    10        null;
    11      end if;
    12    dbms_output.put_line(1);
    13* END;
    SQL> /
    DECLARE
    ERROR at line 1:
    ORA-06531: Reference to uninitialized collection
    ORA-06512: at line 9
    ORA-06510: PL/SQL: unhandled user-defined exceptionJustin

  • 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 in configuring Custom Error Pages for Faces Portlets

    According to
    http://e-docs.bea.com/wls/docs92/schemaref/controls-netuix/http.www.bea.com.servers.netuix.xsd.controls.netuix.1.0.0/element/facescontent.html
    you can specify an errorUri attribute on the facesContent object for the error page.
    <netuix:facesContent contentUri="/testList.jsp" errorUri="/error.jsp"/>
    WebLogic Workshop even allows setting this in the tool.
    However, the errorUri never gets picked up and the following error shows up.
    <BEA-423266> <No setter for property :: errorUri.>
    Anyone faced this problem. Is there any other alternative to specify a custom error page for JSF portlets.
    Please note that the errorUri works fine for the jspContent tag used for JSP Portlets.

    Hi Sanjeev,
    You need to check if you have access to AXF_CONFIGS table. Check if you have ran GRANT_ACCESS.sql script which has below grant commands.
    grant execute any type to apps;
    grant create type to AXF;
    grant select on AXF.AXF_CONFIGS to apps;
    v_formId AXF_CONFIGS.FORMID%TYPE; means tableName.columnName%type;
    so looks like when you are running AXF_EBS_SOLUTION_DATA.sql you are not able to access AXF_CONFIGS table.
    Hope this helps.
    Regards,
    Amol Gavali.

  • OWA_UTL.REDIRECT_UTL to show Custom Error Page

    Hi,
    I am attempting to use the following code to redirect to my Custom error page (Page 500) on various error conditions being raised, within PL/SQL blocks: -
    wwv_flow.g_unrecoverable_error := TRUE;
    HTMLDB_UTIL.SET_SESSION_STATE ('P500_ERRMSG', SQLERRM);
    OWA_UTIL.REDIRECT_URL
    ('f?p='
    || gc_app_id
    || ':ERRPAGE'
    || gc_session_id
    || '::::P500_GO_TO_SCREEN,P500_SOURCE_SCREEN:1,'
    || gc_page_id
    || '');
    I have this working in another environment, but now when this condition is met all I get is a blank page and the following text: -
    Location: f?p=123:ERRPAGE:4328468326428634::::P500_GO_TO_SCREEN,P500_SOURCE_SCREEN:1,119
    Has anyone seen this before?
    Thanks,
    Mike

    Mike - Any event that causes the http header to be closed, such as "htp.p(...)", or the explicit closing of the header as in cookie-setting code where the header is closed afterwards, necessitates the use of htp.init in order to open and stuff the header again (as is the case with a call to owa_util.redirect_url).
    Scott

  • How to remove errorMsg given by jdeveloper & add the new custom error msg

    Hi
    I dropped a table in panel collection layout.on the table i have unique constraint on combination of all the columns to avoid the insertion of duplicate row.when i try to insert duplicate row ,it is giving the following two errors in a popup window automatically by jdeveloper at runtime.
    Messages for this page are listed below.
    Error     
    Constraint "DB_UNIQUE" violated during post operation:"Insert" using SQL Statement "BEGIN INSERT INTO DASHBOARD_SECURITY_TAB(LOGIN_USER_ID,GROUP_NAME) VALUES (:1,:2) RETURNING ROWID INTO :3; END;".
    Error     
    ORA-00001: unique constraint (SCOTT.DB_UNIQUE) violated ORA-06512: at line 1
    for the above error message i added the message "Duplicate rows not allowed" using Managed Bean method.
    the code for this is
    public String commandButton_action2() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("Commit");
    Object result = operationBinding.execute();
    if (operationBinding.getErrors().isEmpty()) {
    FacesContext ctx = FacesContext.getCurrentInstance();
    FacesMessage saveMsg = new FacesMessage("Record Saved Successfully");
    ctx.addMessage(null,saveMsg);
    if (!operationBinding.getErrors().isEmpty()) {
    FacesContext ctx = FacesContext.getCurrentInstance();
    FacesMessage saveMsg = new FacesMessage("Duplicate rows not allowed");
    ctx.addMessage(null,saveMsg);
    return null;
    i want to show only "Duplicate rows not alowed".i want to remove the first two messages given by jdeveloper.
    and also i want to display this message at the statusbar below the page.not in popup window.
    can anyone help me what i need to do.

    Hi John,
    As you told i created the mesageBundle by following the steps described in the Fusion Developer's Guide section 33.8.3, "How to Customize Error Messages for Database Constraint Violations".now i am able to suppress the first error "
    Error
    Constraint "DB_UNIQUE" violated during post operation:"Insert" using SQL Statement "BEGIN INSERT INTO DASHBOARD_SECURITY_TAB(LOGIN_USER_ID,GROUP_NAME) VALUES (:1,:2) RETURNING ROWID INTO :3; END;".
    and displaying my user friendly message like "Duplicate rows not alowed". using the following code
    private static final Object[][] sMessageStrings = new String[][] { {"DB_UNIQUE","Duplicate Rows not allowed"},{"ORA-00001"," "},{"ORA-06512",""}
    Here i want suppress the ORA errors also.but using above code only first error got suppressed.not the ORA errors.
    Here please tell me what i need to do suppress the ORA errors in the popup window.
    The errors i am gertting in popup window are given below.
    *Messages for this page are listed below.*
    *Error     *
    *Constraint "DB_UNIQUE" violated during post operation:"Insert" using SQL Statement "BEGIN INSERT INTO DASHBOARD_SECURITY_TAB(LOGIN_USER_ID,GROUP_NAME) VALUES (:1,:2) RETURNING ROWID INTO :3; END;".*
    *Error     *
    *ORA-00001: unique constraint (SCOTT.DB_UNIQUE) violated ORA-06512: at line 1*
    I appreciate your time and suggestions .
    And also i want to display my userfriendly custom error message in the Status Bar of Panel collection not in a popup window.Is it possible?
    Sailaja
    Edited by: sj0609 on Mar 15, 2009 5:54 PM

  • Custom error page.........please help me

    Hi guys,
    i'm working on a jsf application and i've decided to use a custom error page.
    What i want is displaying the stacktrace of the application level' exceptions like nullpointer,mysql exceptions etc....in a custom error page.
    I've followed an example at the end of core java server faces book but it's doesn' work!!
    Please help me,these are my steps...
    i've defined in my web.xml
    <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
      <error-page>
      <error-code>500</error-code>
      <location>/errorDisplay.jsp</location>
    </error-page>i've errorDisplay.jsp
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <html>
    <f:subview id="dummy">
    <head>
      <title><h:outputText value="Problema nell'applicazione"/></title>
    </head>
    <body>
    <h:form>
    <p><h:outputText value="Un errore � stato riscontrato"/></p>
    <p><h:outputText value="Ecco lo stacktrace"/></p>
    <h:inputTextarea value="#{errorBean.stackTrace}"
    rows="40" cols="80" readonly="true"/>
    </h:form>
    </body>
    </f:subview>
    </html>and this is my managed bean ErrorBean.java
    package giu;
    import java.io.PrintWriter;
    import java.io.StringWriter;
    import java.sql.SQLException;
    import java.util.Map;
    import javax.faces.context.FacesContext;
    import javax.servlet.ServletException;
    public class ErrorBean {
         public String getStackTrace() {
              FacesContext context = FacesContext.getCurrentInstance();
              Map request = context.getExternalContext().getRequestMap();
              Throwable ex = (Throwable) request.get("javax.servlet.error.exception");
              StringWriter sw = new StringWriter();
              PrintWriter pw = new PrintWriter(sw);
              fillStackTrace(ex, pw);
              return sw.toString();
         private static void fillStackTrace(Throwable t, PrintWriter w) {
              if (t == null)
                   return;
              t.printStackTrace(w);
              if (t instanceof ServletException) {
                   Throwable cause = ((ServletException) t).getRootCause();
                   if (cause != null) {
                        w.println("Root cause:");
                        fillStackTrace(cause, w);
              } else if (t instanceof SQLException) {
                   Throwable cause = ((SQLException) t).getNextException();
                   if (cause != null) {
                        w.println("Next exception:");
                        fillStackTrace(cause, w);
              } else {
                   Throwable cause = t.getCause();
                   if (cause != null) {
                        w.println("Cause:");
                        fillStackTrace(cause, w);
    }I cause mysql exceptions in my application,but i see the standard stack trace,not my jsp page with stack trace..
    i think my error is in web.xml in which 500 is only a type of error....i've to adding mysql exceptions????
    How can i do it?
    Please help me

    I have the above solution working in my environment. the only difference is that i have an additional declaration in the deployment descriptor...
    <error-page>
         <exception-type>java.lang.Exception</exception-type>
         <location>/faces/errorDisplay.jsp</location>
    </error-page>

  • Custom error message in SAP application log

    Is there a way to add a custom error message to the SAP application log without passing the message variables MSGV1, MSGV2, MSGV3, MSGV4 and the Message class and number. 
    We want to pass a custom message from the BAPIRET2-MESSAGE without giving it a Message class and number.  The reason for this is that  we are using class based exceptions instead of the traditional message class with errors.  When we catch the class based exception, we take the error text of the exception and put in in the BAPIRET2-message and set the BAPIRET2-TYPE as 'E'.  Now we want to add this to the SAP application log.
    The call to 'BAL_LOG_MSG_ADD' takes a structure BAL_S_MSG which is just like BAPIRET2.  However this function builds the entry to the application log use the message variables MSGV1, MSGV2, MSGV3, MSGV4.  There is no provision to pass in the BAPIRET2 message.
    Add message to application log
      CALL FUNCTION 'BAL_LOG_MSG_ADD'
        EXPORTING
         i_log_handle              = app_log_handle
         i_s_msg                   = log_message
    Thanks,
    Jay

    Hi Jay,
    Did you see <b>BAL_LOG_EXCEPTION_ADD</b>?
    This FM is represented by the structure <b>BAL_S_EXC</b>. This can have various versions as described below:
    <b>Data of BAL_S_EXC Structure  /     Use</b>
    <b>EXCEPTION</b>  /                              Exception class from which an exception text 
                                                       is added to the log. This field must be filled.
    <b>MSGTY</b>  /                                     Message type (MSGTY) of a T100 message.
                                                       This field must also be filled for exceptions.
    <b>PROBCLASS,
    DETLEVEL,
    ALSORT, TIME_STMP</b>  /                Message or exception attributes, such as
                                                        problem class (PROBCLASS, for
                                                        example, "very important"), level of detail
                                                        (DETLEVEL, from 1 to 9), sort criterion
                                                        (ALSORT, unrestricted) and timestamp
                                                        (TIME_STMP). These fields can be displayed
                                                        in the log (except TIME_STMP).
    <b>MSG_COUNT</b>   /                            This attribute is not used for exceptions.
    Follow the link below for more details:
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/d6/5d7f38f52f923ae10000009b38f8cf/frameset.htm">SAP Help DOc</a>
    Hope this helps.
    Thanks
    Sanjeev

  • How can we define custom error page in protal application

    How can we define custom error page in protal application, like we define "jsp Error page " in JSPs

    Hi,
    Check these:
    Customization of Portal Runtime Errors and portal standard error codes
    http://help.sap.com/saphelp_nw04/helpdata/en/9a/e74d426332bd30e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/ec/1273b2c413b2449e554eb7b910bce7/frameset.htm
    Regards,
    Praveen Gudapati

Maybe you are looking for

  • I have instauled elements 12 from a disc when starting the program I got error 16 help please

    I have just instauled elements 12 from a disc, when I opened the programe it told me there was an error 16 and I should uninstal then re-instal and try agan.  I have followed these instruction and I am still getting error 16 after the second time of

  • Transfer ITunes to MAC from PC

    Just got a new IMac and I want to move my itunes file from my PC to the Mac so I can synch my Iphone with it.  What is the best method?  I use Lion version 10.7.  Thanks.

  • SAP Query and selection screen fields

    Hi, I am currently modifying a Query. I have added a new selection field. The fieldname for this selection field has been autogenerated within the query and I have pasted a bit in here: SELECT-OPTIONS SP$00015 FOR ZERROR_FLG LOWER CASE. SELECT-OPTION

  • Hooking An Electric Guitar up to Garage Band 3 on Intel iMac

    This question probably seems a little basic, but this is my first mac since the Mac 128's and I'm not sure where I'm going wrong here. So basically, I want to hook my Floyd Rose electric guitar up to my intel duo core iMac for the first time. This is

  • Airport turns off, won't come back w/o restart

    My Airport card has been driving me crazy since approximately late May. It turns off at will, and I've searched the net and tried a host of fixes -- resetting RAM and whatnot (holding down various button at restart), deleting and adding a new locatio