"user defined exception" in a stored procedure and APEX

I would like to use user defined exception in a stored procedure or trigger in a APEX application.
Does anybody know how to do it ? or know where can I find a good reference ?
Thanks,

raise_application_error(-20001, 'error message');
Scott

Similar Messages

  • User-Defined Exception in Package OE_SCHEDULE_UTIL Procedure Load_Results_f

    Hi Expert,
    While running the Order Import i am getting the error please help us :
    Order Import Concurrent Program
    Concurrent Program Parameters
    Validate Only: N
    Order Source:
    Order Ref:
    Sold To Org Id:
    Sold To Org:
    Change Sequence:
    Performance Parameter: Y
    Trim Blanks: N
    Operation:
    Number of Instances: 0
    Debug Level: 0
    Request Id: 4471
    Org Id: 2453
    Failed to perform Action Request BOOK_ORDER
    Failed to perform Action Request BOOK_ORDER
    No. of orders found: 1
    No. of orders imported: 0
    No. of orders failed: 1
    Source/Order/Seq/Line Message
    10/1046001534//2 ATP Process resulted in no data
    10/1046001534//2 User-Defined Exception in Package OE_SCHEDULE_UTIL Procedure Load_Results_from_tbl
    10/1046001534//2 User-Defined Exception in Package OE_SCHEDULE_UTIL Procedure Load_Results_from_rec
    End of Order Import Concurrent Program
    Regards,
    Suraj

    And also check
    Order Import error : User-Defined Exception in Package OE_SCHEDULE_UTIL Procedure Action_Undemand,User-Defined Exception in Package OE_SCHEDULE_UTIL Procedure Action_Reschedule [ID 737031.1]

  • Passing Arrays of User Defined Types to Oracle Stored Procedures

    Hi
    I am using WebLogic 8.14 & Oracle 9i with thin JDBC driver.
    Our application needs to perform the same DB operation for every item in a Java Collection. I cannot acheive the required performance using the standard Prepare & Execute loop and so I am looking to push the whole collection to Oracle in a single invocation of a Stored Procedure and then loop on the database.
    Summary of Approach:
    In the Oracle database, we have defined a Object Type :
    CREATE OR REPLACE
    TYPE MYTYPE AS OBJECT
    TxnId VARCHAR2(40),
    Target VARCHAR2(20),
    Source VARCHAR2(20),
    Param1 VARCHAR2(2048),
    Param2 VARCHAR2(2048),
    Param3 VARCHAR2(2048),
    Param4 VARCHAR2(2048),
    Param5 VARCHAR2(2048),
    and we have defined a collection of these as:
    CREATE OR REPLACE
    TYPE MYTYPE_COLLECTION AS VARRAY (100) OF MYTYPE
    There is a stored procedure which takes one of these collections as an input parameter and I need to invoke these from within my code.
    I am having major problems when I attempt to get the ArrayDescriptor etc to allow me to create an Array to pass to the stored procedure. I think this is because the underlying Oracle connection is wrapped by WebLogic.
    Has anyone managed to pass an array to an Oracle Stored procedure on a pooled DB connection?
    Thanks
    Andy

    Andy Bowes wrote:
    Hi
    I am using WebLogic 8.14 & Oracle 9i with thin JDBC driver.
    Our application needs to perform the same DB operation for every item in a Java Collection. I cannot acheive the required performance using the standard Prepare & Execute loop and so I am looking to push the whole collection to Oracle in a single invocation of a Stored Procedure and then loop on the database.
    Summary of Approach:
    In the Oracle database, we have defined a Object Type :
    CREATE OR REPLACE
    TYPE MYTYPE AS OBJECT
    TxnId VARCHAR2(40),
    Target VARCHAR2(20),
    Source VARCHAR2(20),
    Param1 VARCHAR2(2048),
    Param2 VARCHAR2(2048),
    Param3 VARCHAR2(2048),
    Param4 VARCHAR2(2048),
    Param5 VARCHAR2(2048),
    and we have defined a collection of these as:
    CREATE OR REPLACE
    TYPE MYTYPE_COLLECTION AS VARRAY (100) OF MYTYPE
    There is a stored procedure which takes one of these collections as an input parameter and I need to invoke these from within my code.
    I am having major problems when I attempt to get the ArrayDescriptor etc to allow me to create an Array to pass to the stored procedure. I think this is because the underlying Oracle connection is wrapped by WebLogic.
    Has anyone managed to pass an array to an Oracle Stored procedure on a pooled DB connection?
    Thanks
    AndyHi. Here's what I suggest: First please get the JDBC you want to work in a
    small standalone program that uses the Oracle thin driver directly. Once
    that works, show me the JDBC code, and I will see what translation if
    any is needed to make it work with WLS. Will your code be running in
    WebLogic, or in an external client talking to WebLogic?
    Also, have you tried the executeBatch() methods to see if you can
    get the performance you want via batches?
    Joe

  • Send a array of user-defined java objects to stored procedure

    hi,
    I´d like to know if its possible send java user-defined objects to a collection. I've tried the exemple bellow but it doesn´t work:
    1) In database
    -- nested table type
    create or replace type client_table_type is table of client%rowtype;
    -- table client:
    teste
    ( id number(18,0),
    name varchar2(80),
    birthday date)
    -- stored procedure
    create or replace package client_pkg
    is
    procedure insert_clients(
    p_array_clients client_table_type
    end;
    2) In Java
    java.lang.Class.forName ("oracle.jdbc.driver.OracleDriver");
    java.sql.Connection conn = java.sql.DriverManager.getConnection("jdbc:oracle:thin .....);
    ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor("client_table_type", conn);
    ARRAY a2 = new ARRAY(descriptor, conn, anArrayIn);
    PreparedStatement ps = (PreparedStatement)conn.prepareStatement("{ call client_pkg.insert_clients(?) }");
    ps.setArray(1, a2);
    ps.execute();
    Where anArrayIn is an array of Client and Client is a java user-defined class with these attributes:
    public class Client{
    public long id;
    public String name;
    public Date birthday;
    3) when I´ve tried to run the java code its returned the error in the ArrayDescriptor line:
    Exception in thread "main" java.sql.SQLException: .....:
    Unable to resolve type: "SISSERV.CLIENT_TABLE_TYPE"
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.sql.ArrayDescriptor.initPickler(ArrayDescriptor.java:1976)
    at oracle.sql.ArrayDescriptor.<init>(ArrayDescriptor.java:199)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:118)
    at teste_array_oracle.Carga.callPLSQL(Carga.java:60)
    at teste_array_oracle.Carga.<init>(Carga.java:41)
    at teste_array_oracle.Carga.main(Carga.java:32)
    erro de execuþÒo
    Tks for any help!

    A brief answer to this from my side (not knowing Java that wel), but hopefully suffices to put you on the right track.
    <p>
    A SQL user defined type is basically a class (it can contain properties and methods). It has only superficial resemblence to a traditional record struct. So you cannot use one. Even if you could (assuming you code a PL/SQL "traditional" record struct), there are issues around how char and numeric data are represented binary inside Oracle and issues around byte/word alignment.
    <p>
    So bottom line - what you're doing will not work (as the errors show).
    <p>
    Okay, so what then? Well, the OCI (Oracle Call Interface) supports all Oracle data types, including these user types (also called Advance Data Types in Oracle-speak). You therefore need to use the supplied API calls to deal with instantiated objects (structures) of these type.
    You're best bet is to have a look Oracle® Database Java Developer's Guide

  • Pass an array of a user defined class to a stored procedure in java

    Hi All,
    I am trying to pass an array of a user defined class as an input parameter to a stored procedure. So far i have done the following:
    Step 1: created an object type.
    CREATE TYPE department_type AS OBJECT (
    DNO NUMBER (10),
    NAME VARCHAR2 (50),
    LOCATION VARCHAR2 (50)
    Step 2: created a varray of the above type.
    CREATE TYPE dept_array1 AS TABLE OF department_type;
    Step 3:Created a package to insert the records.
    CREATE OR REPLACE PACKAGE objecttype
    AS
    PROCEDURE insert_object (d dept_array);
    END objecttype;
    CREATE OR REPLACE PACKAGE BODY objecttype
    AS
    PROCEDURE insert_object (d dept_array)
    AS
    BEGIN
    FOR i IN d.FIRST .. d.LAST
    LOOP
    INSERT INTO department
    VALUES (d (i).dno,d (i).name,d (i).location);
    END LOOP;
    END insert_object;
    END objecttype;
    Step 4:Created a java class to map the columns of the object type.
    public class Department
    private double DNO;
    private String Name;
    private String Loation;
    public void setDNO(double DNO)
    this.DNO = DNO;
    public double getDNO()
    return DNO;
    public void setName(String Name)
    this.Name = Name;
    public String getName()
    return Name;
    public void setLoation(String Loation)
    this.Loation = Loation;
    public String getLoation()
    return Loation;
    Step 5: created a method to call the stored procedure.
    public static void main(String arg[]){
    try{
    Department d1 = new Department();
    d1.setDNO(1); d1.setName("Accounts"); d1.setLoation("LHR");
    Department d2 = new Department();
    d2.setDNO(2); d2.setName("HR"); d2.setLoation("ISB");
    Department[] deptArray = {d1,d2};
    OracleCallableStatement callStatement = null;
    DBConnection dbConnection= DBConnection.getInstance();
    Connection cn = dbConnection.getDBConnection(false); //using a framework to get connections
    ArrayDescriptor arrayDept = ArrayDescriptor.createDescriptor("DEPT_ARRAY", cn);
    ARRAY deptArrayObject = new ARRAY(arrayDept, cn, deptArray); //I get an SQLException here
    callStatement = (OracleCallableStatement)cn.prepareCall("{call objecttype.insert_object(?)}");
    ((OracleCallableStatement)callStatement).setArray(1, deptArrayObject);
    callStatement.executeUpdate();
    cn.commit();
    catch(Exception e){ 
    System.out.println(e.toString());
    I get the following exception:
    java.sql.SQLException: Fail to convert to internal representation
    My question is can I pass an array to a stored procedure like this and if so please help me reslove the exception.
    Thank you in advance.

    OK I am back again and seems like talking to myself. Anyways i had a talk with one of the java developers in my team and he said that making an array of structs is not much use to them as they already have a java bean/VO class defined and they want to send an array of its objects to the database not structs so I made the following changes to their java class. (Again hoping some one will find this useful).
    Setp1: I implemented the SQLData interface on the department VO class.
    import java.sql.SQLData;
    import java.sql.SQLOutput;
    import java.sql.SQLInput;
    import java.sql.SQLException;
    public class Department implements SQLData
    private double DNO;
    private String Name;
    private String Location;
    public void setDNO(double DNO)
    this.DNO = DNO;
    public double getDNO()
    return DNO;
    public void setName(String Name)
    this.Name = Name;
    public String getName()
    return Name;
    public void setLocation(String Location)
    this.Location = Location;
    public String getLoation()
    return Location;
    public void readSQL(SQLInput stream, String typeName)throws SQLException
    public void writeSQL(SQLOutput stream)throws SQLException
    stream.writeDouble(this.DNO);
    stream.writeString(this.Name);
    stream.writeString(this.Location);
    public String getSQLTypeName() throws SQLException
    return "DOCCOMPLY.DEPARTMENT_TYPE";
    Step 2: I made the following changes to the main method.
    public static void main(String arg[]){
    try{
    Department d1 = new Department();
    d1.setDNO(1);
    d1.setName("CPM");
    d1.setLocation("LHR");
    Department d2 = new Department();
    d2.setDNO(2);
    d2.setName("Admin");
    d2.setLocation("ISB");
    Department[] deptArray = {d1,d2};
    OracleCallableStatement callStatement = null;
    DBConnection dbConnection= DBConnection.getInstance();
    Connection cn = dbConnection.getDBConnection(false);
    ArrayDescriptor arrayDept = ArrayDescriptor.createDescriptor("DEPT_ARRAY", cn);
    ARRAY deptArrayObject = new ARRAY(arrayDept, cn, deptArray);
    callStatement = (OracleCallableStatement)cn.prepareCall("{call objecttype.insert_array_object(?)}");
    ((OracleCallableStatement)callStatement).setArray(1, deptArrayObject);
    callStatement.executeUpdate();
    cn.commit();
    catch(Exception e){
    System.out.println(e.toString());
    and it started working no more SQLException. (The changes to the department class were done manfully but they tell me JPublisher would have been better).
    Regards,
    Shiraz

  • How to pass a user defined table type to stored procedure?

    Hi,
    I am trying to call a stored procedure from Java. The store procedure has three IN parameter, 2 IN/OUT params and 3 OUT parameters. The two IN/OUT parameters are user defined objects. Can anyone tell me how to set these IN/OUT parameters in Java.
    Thanks

    It is database/driver specific so you need to use the specific functionality of the driver (not jdbc) to access it.

  • RAISING EXCEPTION AND SHOWING TO USERS IN FORM BASED ON STORED PROCEDURE

    I have a form based on stored procedure.
    I want to handle exceptions in the stored procedure and show it to users.
    Here is what i want to do.
    I have a sku# field in the form and i want to validate it(against the database
    table) in the procedure before inserting into the database.
    I want to give a message to users when the validation fails.
    How is this possible with the forms based on stored procedure?
    Can i use javascript to do the same?
    Thanks in Advance

    I have a form based on stored procedure.
    I want to handle exceptions in the stored procedure and show it to users.
    Here is what i want to do.
    I have a sku# field in the form and i want to validate it(against the database
    table) in the procedure before inserting into the database.
    I want to give a message to users when the validation fails.
    How is this possible with the forms based on stored procedure?
    Can i use javascript to do the same?
    Thanks in Advance

  • Help in user defined exception handler

    Hi
    Can some one help in solving this error .
    when i run my procedure i get this error which is given below .
    ORA-06510 PL/SQL unhandeled user defined exception at line 7
    Procedure FMG_EXTRACT_MOTORBIKE_NEWBUS (P_NSSC_YN VARCHAR2) IS
    l_start date;
    l_end date;
    cursor motorbike_rec is
    select
    c.id,
    k.id pak_id,
    p.ref,
    i.description,
    i.current_status,
    i.premium,
    i.sum_insured,
    mv.registration_no,
    mv.cc_rating,
    nl.ncl_level,
    nl.percentage_discount,
    dp.full_name main_driver,
    dpd.birth_date,
    e.user_name entered_by,
    ep.full_name emp_name,
    fmg_get_imposed_terms(i.id,'. ',';') imposed_terms
    from
    fmg_clients c,
    fmg_client_paks k,
    fmg_policies p,
    fmg_Policy_items i,
    fmg_mv_usages u,
    fmg_people dp,
    fmg_people_details dpd,
    fmg_employees e,
    fmg_people ep,
    fmg_motor_vehicles mv,
    fmg_ncb_levels nl
    where i.date_created>=l_start
    and i.date_created<l_end
    and i.pol_id=p.id
    and p.ctp_id=k.id
    and k.cli_id=c.id
    and i.id=u.poi_id(+)
    and u.per_id=dp.id(+)
    and dp.id=dpd.per_id(+)
    and i.id=mv.poi_id(+)
    and i.ncl_id=nl.id(+)
    and ( (i.pit_pro_code in ('TFF','FMC','FMT','FMF','FBK','PMC','TPO','MCL'))
    or (i.pit_pro_code = 'CMV' and i.pit_code = 'MCL')
    or (i.pit_pro_code = 'PMS' and i.pit_code = 'MCL')
    or (i.pit_pro_code = 'PMT' and i.pit_code in ('MCT','MCF'))
    and i.user_created=e.user_name
    and ( (e.business_unit='BCC' and P_NSSC_YN='Y') OR (nvl(e.business_unit,'X')<>'BCC' and P_NSSC_YN='N') )
    and e.per_id=ep.id;
    l_file UTL_FILE.FILE_TYPE;
    l_file_name varchar2(100);
    l_data VARCHAR2(4000);
    BEGIN
    if P_NSSC_YN='Y' then
    l_start := trunc(sysdate)-1;
    l_end := trunc(sysdate);
    l_file_name := 'MotorCycle_Daily_'||to_char(l_start)||'.csv';
    l_file := utl_file.fopen( fmg_re_filepath('SSC'), l_file_name, 'W' );
    else
    l_start := to_date('01-' || to_char(sysdate-28,'MM-YYYY'));
    l_end := last_day(to_date('01-' || to_char(sysdate-28,'MM-YYYY')));
    l_file_name := 'MotorCycle_Monthly_'||to_char(l_start)||'_'||to_char(l_end)||'.csv';
    l_file := utl_file.fopen( fmg_re_filepath('GAU'), l_file_name, 'W' );
    end if;
    l_data := '"Client ID","Pak ID","Policy Ref","Item Desc","RegoNo","CC","Item Status","Premium","Sum Insured",' ||
    '"NCB Level","NCB%","Main Driver","Birth Date","Imposed terms","EnteredBy","Employee Name"';
    utl_file.put_line(l_file, l_data );
    for i in motorbike_rec loop
    l_data :=
    to_char(i.id) || ',' ||
    to_char(i.pak_id) || ',' ||
    i.ref || ',' ||
    '"' || i.description || '",' ||
    '"' || i.registration_no || '",' ||
    to_char(i.cc_Rating) || ',' ||
    i.current_status || ',' ||
    to_char(i.premium) || ',' ||
    to_char(i.sum_insured) || ',' ||
    to_char(i.ncl_level) || ',' ||
    to_char(i.percentage_discount) || ',' ||
    '"' || i.main_driver || '",' ||
    to_char(i.birth_date) || ',' ||
    '"' || i.imposed_terms || '",' ||
    i.entered_by || ',' ||
    '"' || i.emp_name || '"' ;
    utl_file.put_line(l_file,l_data);
    end loop;
    utl_file.fclose( l_file );
    exception
    when others then
    if utl_file.is_open(l_file) then
    utl_file.fclose( l_file );
    end if;
    raise;
    END;

    What does fmg_re_filepath('SSC') return? Are their sufficient rights with Oracle user on the location that is returned by this function?
    Which OS are you using?

  • How to raise the user defined Exceptions in XI ?

    Hi All
        I am learning XI ...i want know how to set up the user defined Exceptions
        in XI?
        Where and What are the settings need to be done ?
        Same time where can check the LOG file ? to see all the server information ?
    Welcome to your answers
    Regards
    Rakesh

    Rakesh,
    Check this weblogs which will guide you:
    /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
    /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
    /people/stefan.grube/blog/2005/12/30/test-user-defined-functions-for-the-xi-graphical-mapping-tool-in-developer-studio
    Also check this thread:
    Mapping test throughs exception for UDF that does'nt exist anymore
    ---Satish

  • Handle user defined exception in stored procedure

    Dear all,
    I'm using JDev 11.1.1.4.0
    In my application I'm calling the stored procedure with only in parameters using the Example 37-9 http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/bcadvgen.htm#ADFFD1056
    In my stored procedure I have user defined exception, like:
    create or replace procedure ...
    AS
    e_otwarty     EXCEPTION;
    //some code
      EXCEPTION
        WHEN e_otwarty THEN
          dbms_output.put_line('Masz juz otwarty raport');
          // or what should I do here ??
    END;I want to display the message in the popup window in my ADF application. How can I do that ?
    Regards,
    Wojtek.

    raise_application_error(-20001, 'error message');
    Scott

  • "Nested and User Defined Exceptions" in Java...Theory and Code Required...?

    Can anyone provide theoretical information with example code for "Nested Exceptions" and "User Defined Exceptions"..? Or it would be equally good, if someone can provide links for further reading on the said topic.

    User Defined Exceptions are the same as exceptions in the JDK, but are defined by a "User"
    I suggest you look at the JDK for examples.
    A Nested Exception is an Exception with a different exception set as the cause.
    This pages covers more than you need to know with examples. [http://java.sun.com/javase/6/docs/api/java/lang/Throwable.html]

  • Difference between a "stored procedure" and a "procedure defined in package

    Hi,
    Is there any difference between a "stored procedure" and a "procedure defined in package"
    thanks in advance

    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_packages.htm#sthref779
    Steps
    http://www.oracle.com/pls/db102/homepage
    http://www.oracle.com/pls/db102/search?word=stored+procedure+package
    5th result

  • Unhandled user-defined exception in dbms_session?

    hi guys,
    I've had some code that's been working for a while but just now has started giving me the following:
    SQL> select *
      2    from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE    10.2.0.5.0      Production
    TNS for Linux: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    5 rows selected.
    Elapsed: 00:00:00.00
    SQL> begin
      2 
      3 
      4          dbms_session.set_nls('cursor_sharing','FORCE');
      5         
      6         
      7  end;                                                     
      8  /
    begin
    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "SYS.DBMS_SESSION", line 158
    ORA-06512: at line 4I've closed my sessions and restarted, it doesn't matter whether this is running via a stored proc or as an anonymous block like the above - what should I be looking for to find the cause of this?
    I don't think I've been changing anything except using the dbms_session.set_identifier procedure, but certainly not in the sessions that I've been setting this nls parameter...

    sybrand_b wrote:
    You can not use set_nls to change this parameter, you need 'execute immediate 'alter system... etc'
    And it is a bad hack to work around not using bind variables.
    Sybrand Bakker
    Senior Oracle DBAalso a work around for when your system's parameter is set to 'SIMILAR' but you're trying to use certain XML functionality:
    SQL> alter session set cursor_sharing = SIMILAR;
    Session altered.
    Elapsed: 00:00:00.00
    SQL> with t as (select xmltype('<validation>
      2                                <error id="1">
      3                                  <sys_message>test</sys_message>
      4                                  <cust_message>testing</cust_message>
      5                                  <cust_code>blahblah</cust_code>
      6                                </error>
      7                              </validation>') pi_xml from dual)                  
      8            SELECT xtab.sys_message
      9                  ,xtab.cust_message
    10                  ,xtab.cust_code
    11              FROM xmltable('/validation/error'
    12                    passing (SELECT pi_xml
    13                               FROM T)
    14                    COLUMNS
    15                      ID            NUMBER   path '/error/@id'
    16                      ,sys_message  VARCHAR2(1000) path '/error/sys_message'
    17                      ,cust_message VARCHAR2(1000) path '/error/cust_message'
    18                      ,cust_code    VARCHAR2(1000) path '/error/cust_code') xtab;
                                </validation>') pi_xml from dual)
    ERROR at line 7:
    ORA-01780: string literal required
    Elapsed: 00:00:00.00
    SQL> alter session set cursor_sharing = 'FORCE';
    Session altered.
    SQL> with t as (select xmltype('<validation>
      2                                <error id="1">
      3                                  <sys_message>test</sys_message>
      4                                  <cust_message>testing</cust_message>
      5                                  <cust_code>blahblah</cust_code>
      6                                </error>
      7                              </validation>') pi_xml from dual)                   
      8            SELECT xtab.sys_message
      9                  ,xtab.cust_message
    10                  ,xtab.cust_code
    11              FROM xmltable('/validation/error'
    12                    passing (SELECT pi_xml
    13                               FROM T)
    14                    COLUMNS
    15                      ID            NUMBER   path '/error/@id'
    16                      ,sys_message  VARCHAR2(1000) path '/error/sys_message'
    17                      ,cust_message VARCHAR2(1000) path '/error/cust_message'
    18                      ,cust_code    VARCHAR2(1000) path '/error/cust_code') xtab; 
    SYS_MESSAGE
    CUST_MESSAGE
    CUST_CODE
    test
    testing
    blahblah
    1 row selected.edit:
    incidentally, the exact same result can be retrieved with with cursor_sharing = similar if you do it this way...:
    SQL> alter session set cursor_sharing = SIMILAR;
    Session altered.
    Elapsed: 00:00:00.00
    SQL> with t as (select xmltype('<validation>
      2                                <error id="1">
      3                                  <sys_message>test</sys_message>
      4                                  <cust_message>testing</cust_message>
      5                                  <cust_code>blahblah</cust_code>
      6                                </error>
      7                              </validation>') pi_xml from dual)                     
      8        SELECT extractvalue(pi_xml,'/validation/error[@id=1]/sys_message')  sys_message
      9              ,extractvalue(pi_xml,'/validation/error[@id=1]/cust_message') cust_message
    10              ,extractvalue(pi_xml,'/validation/error[@id=1]/cust_code')    cust_code
    11          FROM (SELECT pi_xml
    12                  from t); 
    SYS_MESSAGE
    CUST_MESSAGE
    CUST_CODE
    test
    testing
    blahblah
    1 row selected.Edited by: WhiteHat on May 11, 2011 5:11 PM

  • Return User Defined Exceptions from SP

    Hi,
    Is it possible to return user defined business exceptions from a stored procedure to the dotnet app. through ODP. NET( equivalent to the throw keyword in Java)?
    I would prefer to handle all of the oracle expections in the try catch block of the C# code.
    Thanks,
    Peeyush

    Is your question how to return a custom exception from PLSQL? You'd use RAISE_APPLICATION_ERROR for that, and yes it would propagate via ODP to the calling application.
    Here's a simple dumb example:
    create or replace procedure raise_my_error as
    begin
    raise_application_error(-20001,'something bad happened');
    end;
    Hope it helps,
    Greg

  • IE only: wwsec_app_priv.process_signon (User-Defined Exception) (WWC-41417)

    I am using Portal 3.0.6 in Sun SunOS 5.8. The site will be running in https mode. As everybody knows, 443 is the default port number for ssl mode. I setup the httpd.conf to 443. No problem. I ran ssodatan to relate Login Server to Portal - I had to specify 443 at the end of URL in ssodatan syntax. Otherwise, I got "Error:You cannot login because there is no configuration information stored in the enabler configuration table. (WWC-41439)" both in Netscape navigator and MS Internet Explorer.
    I now am able to log in Portal site. But, the problem happens just after loggin in. With Navigator I don't get any problems. But, IE gives me "Error: Unexpected error encountered in wwsec_app_priv.process_signon (User-Defined Exception) (WWC-41417)". I guess this happens because of how IE works with https. It takes 443 off from URL in https mode. The portal is unable to match the url and what it has in wwsec_enabler_config_info$ which has 443. When I tested with 444 as port number. It worked! Putting a port number in URL will be cumbersome. That's why I am trying with 443.
    I tried also with ssodatax to add an additional entry for without 443 as specified in a document "Oracle9ias Portal configuration options" page 30. Ssodatax has a bug so it updates existing entry, too. I had to update it back to its original value. It's fine. But, this time another error comes up. "WWC-00000". I don't see any solution for this.
    null

    When a new user is logging on for the first time, the portal adds them to the AUTHENTICATED_USERS group under the portal's group container. In your case, for some users, this is apparently running into some problem.
    To debug this, try turning on additional logging on the OID server and attempt logging in as these users, and see what is reported.
    You should enable the following debug flags:
    Search Filter Processing
    Access Control List Processing
    Status Log Connections/Operations/Results

Maybe you are looking for

  • Can't Set Time in "Reminders" App

    This seems like a really basic question that should be a non-issue, but I can't figure out how to set a specific Time for the "Reminders" application on my Macbook Air 2012 (with Mountian Lion). I can creat New Reminders, name them, I can make a remi

  • Error Saving Face Data

    Whenever I click "find faces for tagging" The box comes up Then all the faces start to appear When i try and tag any of them, it says Error Saving Face Data Please Help!

  • Migration from Ipad1 16Gb to Retina 32GB  procedure

    The existing tablet is on iOS 5.1.1, can all apps and/or content be selectively transfered to the new one ?. I presume that the data and apps stay untouched on the old one or perhaps I am wrong !

  • Client side database setting?

    Hi all, I currently have an application deployed on the j2ee server. Using the oracle thin driver and datasource. Which all part of the program works fine, if I run it in the server. Now, I have copied the files to another remote machine, having a ba

  • Process scenario

    Hi How do I set business rules in obpm studio. I want to create a process.. the scenario is like this... there will be 5 roles. 1.Employee 2.Manager 3.Immediate manager 4.Senior Manager 5.Financial Manager. business rules are like this. 1. if the emp