ORA-02291

0. Am using these products:
Forms [32 Bit] Version 10.1.2.0.2 (Production)
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real Application Clusters, Data Mining and Real Application Testing options
1. Form is commited. I am the only user of the form.
2. Button trigger contains only
Insert into xxxxx (b1,b2,b3) values(y1,y2,y3);
but the insert doesn't succeed.
Table xxxxx
a. is not a base table of the form
b. is without parent or child.
c. has no database triggers.
The datatypes of the b1,b2,b3 match y1,y2,y3 respectively.
A 'when others' exception handler is on the insert statement.
The statement works fine outside the form.
Result:
1. Exception handler doesn't catch error
2. Receive message
frm-40735 when-button-pressed raised unhandled exception ora-02291
How do I correct it?
Edited by: 887186 on Sep 23, 2011 4:25 PM

Insert into xxxxx (b1,b2,b3) values(y1,y2,y3);So, what happens when you try your INSERT through SQL Developer or SQL*Plus? Do you still get the error? If so, regardless of what you say, there is a constraint on the target table. You either need to delete the constraint or add the matching parent record first. :)
Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly.
Edited by: CraigB on Sep 28, 2011 9:17 AM

Similar Messages

  • ORA-02291 - ORA-02063 on merge with dml error logging through DB link

    Hello all,
    I have 2 DB's and I would like to merge records from A into B with dml error logging through a db link.
    Exemple:
    merge into B@dblink
    using (select ... from A where...)
    when matched then
    when not matched then
    log errors into err$_A reject limit unlimited;
    When I use this, and exception is thrown:
    ORA-02291: integrity constraint (B.constraint_name) violated - parent key not found
    ORA-02063: preceding line from dblink
    I've got no idea of what causes this.
    Could anyone please help me ?
    Thanks !
    Regards,
    TDE.

    Hello damorgan,
    Thanks for your answer.
    I've well understood that its was a foreign key violation, and I guess that's an error in the source: wee make only logical deletes, and I'm quite sure the problem is there.
    Anyway, I really would understand why dml error logging doesn't work in this case.
    I'll investigate and keep you informed.
    Regards.

  • Oracle errors frm-40508 &ora-02291

    hello
    i m having a problem
    i have two tables for my project with one of em master and the other a detail one
    i m using developer 2000 for frontend
    when i try inserting data in the forms developed i encounter an error frm-40508 which says "unable to insert record" the corresponding ora error is ora-02291 which says "integrity constraint violated - parent key not found"
    i have a primary key in my master table which is used to connect it to details table through foreign key.feilds for the primary key in master and foreign key in details are same
    i dont have any such problem if i input data through sql command insert
    plz suggest me some solution to this problem
    thnx
    nipun

    Hi,
    Just try watching is therer ar no unique indexes on that table where u are doing an insert. another reason might be the composite primary key or the combination that might be confusing you.
    U can try out adding an exception block to the trigger and try raise when-dup-val-on-index exception
    Thanks,
    Vishal

  • ORA-02291 during MERGE on self-referenced table

    Hello,
    I encountered error ORA-02291 when I tried to use MERGE statement on the table with "self-referenced" foreign key. Using the foreign key deferrable did not help. The only one thing, which helped me, was using errorlog table. See the demonstration:
    Working as common user:
    SQL> CONNECT scott/tiger
    First of all, I create table and (not deferrable) constraints:
    CREATE TABLE fkv (
         id NUMBER(1) CONSTRAINT nn_fkv_id NOT NULL,
         parent_id NUMBER(1) CONSTRAINT nn_fkv_paid NOT NULL
    ALTER TABLE fkv ADD CONSTRAINT pk_fkv_id PRIMARY KEY (id);
    ALTER TABLE fkv ADD CONSTRAINT fk_fkv_paid FOREIGN KEY (parent_id) REFERENCES fkv(ID) NOT DEFERRABLE;
    INSERT is working well:
    INSERT INTO fkv (
         id,
         parent_id
    SELECT
    1,
    1
    FROM
    DUAL;
    COMMIT;
    1 rows inserted.
    commited.
    MERGE statement using UPDATE branch is working well too:
    MERGE INTO fkv USING (
    SELECT
    1 AS ID,
    1 AS PARENT_ID
    FROM
    DUAL
    ) a
    ON (
    fkv.id = a.id
    WHEN MATCHED THEN
    UPDATE SET
    fkv.parent_id = a.parent_id
    WHERE
    A.ID IS NOT NULL
    DELETE WHERE a.id IS NULL
    WHEN NOT MATCHED THEN
    INSERT (
    ID,
    parent_id
    VALUES (
    A.ID,
    A.PARENT_ID);
    COMMIT;                                        
    1 rows merged.
    commited.
    And now is coming the strange behaviour:
    MERGE INTO fkv USING (
    SELECT
    2 AS id,
    2 AS PARENT_ID
    FROM
    DUAL
    ) a
    ON (
    fkv.id = a.id
    WHEN MATCHED THEN
    UPDATE SET
    fkv.parent_id = a.parent_id
    WHERE
    A.ID IS NOT NULL
    DELETE WHERE a.id IS NULL
    WHEN NOT MATCHED THEN
    INSERT (
    ID,
    parent_id
    VALUES (
    A.ID,
    A.PARENT_ID);
    SQL Error: ORA-02291: integrity constraint (SCOTT.FK_FKV_PAID) violated - parent key not found
    ROLLBACK;
    rollback complete.
    Ok, even it is not a good solution, I try deferrable constraint:
    ALTER TABLE fkv DROP CONSTRAINT fk_fkv_paid;
    ALTER TABLE fkv ADD CONSTRAINT fk_fkv_paid FOREIGN KEY (parent_id) REFERENCES fkv(id) DEFERRABLE INITIALLY DEFERRED;
    table FKV altered.
    table FKV altered.
    MERGE INTO fkv USING (
    SELECT
    2 AS id,
    2 AS PARENT_ID
    FROM
    DUAL
    ) a
    ON (
    fkv.id = a.id
    WHEN MATCHED THEN
    UPDATE SET
    fkv.parent_id = a.parent_id
    WHERE
    A.ID IS NOT NULL
    DELETE WHERE a.id IS NULL
    WHEN NOT MATCHED THEN
    INSERT (
    ID,
    parent_id
    VALUES (
    A.ID,
    A.PARENT_ID);
    1 rows merged.
    COMMIT;
    SQL Error: ORA-02091: transaction rolled back
    ORA-02291: integrity constraint (SCOTT.FK_FKV_PAID) violated - parent key not found
    ... deffered constraint did not help :-(
    Let's try another way - errorlog table; for the first with the not deferrable constraint again:
    ALTER TABLE fkv DROP CONSTRAINT fk_fkv_paid;
    ALTER TABLE fkv ADD CONSTRAINT fk_fkv_paid FOREIGN KEY (parent_id) REFERENCES fkv(ID) NOT DEFERRABLE;
    table FKV altered.
    table FKV altered.
    BEGIN
    sys.dbms_errlog.create_error_log (
    dml_table_name => 'FKV',
    err_log_table_name => 'ERR$_FKV'
    END;
    anonymous block completed
    Toys are prepared, let's start with error logging:
    MERGE INTO fkv USING (
    SELECT
    2 AS id,
    2 AS PARENT_ID
    FROM
    DUAL
    ) a
    ON (
    fkv.id = a.id
    WHEN MATCHED THEN
    UPDATE SET
    fkv.parent_id = a.parent_id
    WHERE
    A.ID IS NOT NULL
    DELETE WHERE a.id IS NULL
    WHEN NOT MATCHED THEN
    INSERT (
    ID,
    parent_id
    VALUES (
    A.ID,
    A.PARENT_ID)
    LOG ERRORS INTO err$_fkv;
    1 rows merged.
    Cannot belive, running SELECT for confirmation:
    SELECT * FROM err$_fkv;                    
    SELECT * FROM fkv;
    no rows selected
    ID PARENT_ID
    1 1
    2 2
    Ok, COMMIT:
    COMMIT;
    commited.
    SELECT for confirmation again:
    SELECT * FROM err$_fkv;                    
    SELECT * FROM fkv;
    no rows selected
    ID PARENT_ID
    1 1
    2 2
    Using deffered constraint and error logging is working well too.
    Metalink and Google did not help me. I am using databases 10.2.0.5 and 11.2.0.3.
    Has somebody encountered this problem too or have I missed something?
    Thank you
    D.

    drop table fkv;
    CREATE TABLE fkv (
    id NUMBER(1) CONSTRAINT nn_fkv_id NOT NULL,
    parent_id NUMBER(1) CONSTRAINT nn_fkv_paid NOT NULL
    CREATE INDEX PK_FKV_ID ON FKV(ID);
    ALTER TABLE fkv ADD CONSTRAINT pk_fkv_id PRIMARY KEY (id);
    ALTER TABLE FKV ADD CONSTRAINT FK_FKV_PAID FOREIGN KEY (PARENT_ID) REFERENCES FKV(ID);Now run your MERGE statement and it works with non deferrable constraints.
    Personally, I would contact support about this before depending on it in production.
    P.S. I was not able to reproduce your findings that dropping and re-adding the constraints changes things. I suspect that when you dropped the constraint the index was NOT dropped, so you kept a non-unique index.
    Try again using ALTER TABLE FKV DROP CONSTRAINT PK_FKV_ID drop index;

  • FRM-40735:KEY-COMMIT  ORA-02291 trigger raised unhandled exception

    FRM-40735:KEY-COMMIT ORA-02291 trigger raised unhandled exception. when i tried to save records.
    I am using multi record block , 12 records will display at a time, i am trying to save 1st and 5th record which i changed.
    calling a procedure in key-commit trigger
    PROCEDURE desig_updation IS
    V_count number := get_block_property('employee_master',query_hits);
    BEGIN
    go_block('employee_master');
    first_record;
    for i in 1.. V_count loop
         if((:desig is not null ) and (:new_date is not null) and (:emp_desig<>:desig) and (:new_date >=:emp_desig_date)) then
              :emp_desig :=:desig;
              :emp_grade:=:grade;
              :emp_desig_date:=:new_date;
              :emp_upd_by:=:global.usr;
              :emp_upd_on:=:system.current_datetime;
              if( (:radio_group=2) and (:incr_amt is not null)) then
                   increment_process;
                   end if;
         end if;
         if :system.last_record ='TRUE' then exit;
         else next_record;
         end if;     
    end loop;
    END;
    PROCEDURE commit_action IS
    BEGIN
    desig_updation;
    commit_form;
    IF FORM_SUCCESS THEN
    CLEAR_FORM(NO_VALIDATE);
    EXECUTE_TRIGGER('PRE-FORM');
    END IF;     
    END;
    key-commit-trigger
    commit_action;
    commit_form;
    IF FORM_SUCCESS THEN
    CLEAR_FORM(NO_VALIDATE);
    EXECUTE_TRIGGER('PRE-FORM');
    END IF;
    PROCEDURE increment_process IS
    m_gross_sal number;
    p_rslt varchar2(200);
    p_status varchar2(20);
    BEGIN
    delete from INCR_TEMP where ECODE = :emp_code ;
    m_gross_sal := aod_gross_salary(:emp_orgn,:emp_code,'A');--find current salary
    insert into INCR_TEMP(ECODE , CURR_SAL ,
    INCREMENT_AMT ,TOTAL_AOD,
    STATUS,INCR_TYPE)
    values(:emp_code,m_gross_sal,
    :incr_amt,m_gross_sal+:incr_amt,
    'N','I');
    forms_ddl('commit');
    update_emp_increment(:emp_orgn,:emp_code,
    TRUNC(to_date(to_char(:new_Date,'DD/MM/YYYY'),'DD/MM/YYYY')),null,
    :incr_amt, p_rslt,
    :parameter.p_user,to_date(to_char(SYSDATE,'DD/MM/YYYY'),'DD/MM/YYYY'),'I',
    p_status);
    END;
    thanks,
    rinz

    It seems you are insert some data in child table. For which parent data does not exist. In simple primary key values does not exist while you are trying to insert in foreign key values. check this link.
    http://www.lmgtfy.com/?q=ORA-02291
    -Ammad

  • Error Handling for ORA-02291

    Dear all,
    please help me, what exception name i must use
    (like "NO_DATA_FOUND" or "DUP_VAL_ON_INDEX") for error handling
    (exception) for ORA-02291 : integrity constraint(....) violated -
    parent key not found.
    Thank you.
    Regards
    Teguh Santoso

    Find out the error no. Oracle returns for this error & in the
    front-end (Ex:Forms) create a Pragma Exception error handler &
    give ur user defined error message when the user encounters
    it....
    Hope this suffices.
    Santhosh

  • Consolidator Exception: ORA-02291

    We have Olite 10g R2 on a Windows 2003 5.2 Operating system. We packaged an application and published it to the Mobile Server. When we attempt to assign access to a user or a group we are getting a VIRTUAL PATH IS NULL error. Even though we get this error it still shows the user or group as having access on the APPLICATION: ACCESS table. When we attempt to set the ROLES for the USER or GROUP we then get the following error.
    Error in executing “ Save application “:oracle.lite.web.resource.ResourceException: CONS-10049: Consolidator Exception: ORA-02291: integrity constraint (MOBILEADMIN.C$ALL_CLIENT_ITEMSFK) violated – parent key not found
    The 10.2.0.2.0 patchset has been applied. We are still getting both of these errors. Is there another patch that is required? Need some help.

    When you publish an application data is created in the mobileadmin repository schema
    C$ALL_PUBLICATIONS will contain one record for each publication item you create (plus a few pre-loaded default ones). The record includes the select statement used to define the snapshot for the publication item, so if this is for an object with a lot of columns or a complex select statement it can result in a large record. From this error is looks like the table space definition is too small.
    You need to talk to your DBAs about getting this increased. If it is too small as well as problems with the publish, the MGP process may fail as well as by default the CFM$ inqueue and CMP$ out queue tables also get created in this tablespace

  • Bulk insert returns ORA-02291

    When bulk inserting with BindArrayOfStruct when a row fails with ORA-02291 all remaining valid rows fail with the same error.
    If the invalid row is removed from the array the other rows are inserted.
    If a row fails with another error all remaining rows are inserted.
    Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production

    Are you executing the statement in OCI_BATCH_ERRORS mode? If so, after statement execution, the statement handle attribute OCI_ATTR_ROW_COUNT should indicate the number of rows successfully inserted. The statement handle attribute OCI_ATTR_NUM_DML_ERRORS should indicate the number of rows that encountered an error. You can then loop through the errors to determine which row(s) had errors. Chapter 4 of the OCI Programmer's Guide has an example of how this is done.
    If you are executing the statement in OCI_DEFAULT mode, then execution should stop when the first error is encountered. The statement handle attribute OCI_ATTR_ROW_COUNT will indicate the number of rows successfully inserted so you can deduce the problematic row.
    If this is not what you are seeing, then perhaps you can include a snippet of your code.

  • Need more info than ORA-02291

    Hi!
    I wonder if there is a way to find out more specific information than the error "ORA-02291" provides - it only tells you which constraint was violated, not what the violating value(s) were?!
    In my scenario, an application inserts data into several tables that have plenty of constraints. Constraints are deferred. When setting the constraints immediate again (or just COMMITing) I get ORA-02291.
    I really need to know the actual values of the violating record, not just the constraint that was violated.
    I'm using OCI (SQL+ for some debugging) and a 9.2 DB.

    Thanks for the reply.
    First, I don't know PL/SQL very well, so forgive me if I'm being stupid here ;)
    I don't see that this would help in my case. All constraints are DEFERRED, which means I don't get an error even if I checked every insertion (which I do, anyway). This is by design; there are lots of tables and constraints and easier to insert everything in no particular order.
    I can detect the constraint violations when I set the constraints IMMEDIATE again - which is fine. But I only get the violated CONSTRAINT, not the violating record which I (still) need.

  • ORA-01843 and ORA-02291 when installing AIA 2.0 on Linux server

    Hello,
    When installing AIA 2.0 on a RHEL 4.7 Linux server, even if OUI does say the installion is successful, the installActions log are not that good...
    We've got some ORA-01843 and ORA-02291 errors when running the createDiagnosticsCAVSData.sql.
    [exec] createBSRIntegScenarioTables:
    [exec] [echo] ----Creating createCAVSTables--------------
    [exec] [sql] Executing resource: /exec/applis/tbaia/products/AIA/seeddata/DatabaseObjects/createBSRIntegScenarioTables.sql
    [exec] [sql] 152 of 152 SQL statements executed successfully
    [exec]
    [exec] createDiagnosticsCAVSData:
    [exec] [echo] ----Creating createCAVSTables--------------
    [exec] [sql] Executing resource: /exec/applis/tbaia/products/AIA/seeddata/DatabaseObjects/createDiagnosticsCAVSData.sql
    [exec] [sql] Failed to execute: Insert into CAVS_DEFINITIONS (DEFINITION_ID,TYPE,DESCRIPTION,STATE,SERVICE_TYPE,URL_WSDL,URL_ENDPOINT,SOAP_ACTION,SOAP_TRANSPORT_TYPE,MESSAGE_REQUEST,MESSAGE_RESPONSE,DELAY,VERSION,PROJECT_NAME,PROJECT_VERSION,EBS_NAME,EBS_VERSION,PROCESS_NAME,PROCESS_VERSION,SERVICE_NAME,SERVICE_VERSION,MESSAGE_NAME,MESSAGE_VERSION,PIP_NAME,PIP_VERSION,APPLICATION_NAME,APPLICATION_VERSION,TEST_PRIORITY,REFERENCE_ID_EXTERNAL,AUDITED_ON,AUDITED_BY) values (501,'Test','BPEL Transformation Diagnostics','Unlocked','Synchronous',null,'http://dvedvb40:7777/orabpel/default/AIADiagnosticsTransformBpelProcess/1.0','process','HTTP','<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body xmlns:ns1="http://xmlns.oracle.com/BRM/schemas/BusinessOpcodes"> <ns1:PCM_OP_BILL_DEBIT_inputFlist> <ns1:BAL_GRP_OBJ>Test</ns1:BAL_GRP_OBJ> <ns1:DEBIT elem="523"> <ns1:BAL_OPERAND>1000</ns1:BAL_OPERAND> <ns1:TYPE>881</ns1:TYPE> </ns1:DEBIT> <ns1:DESCR>Sample Input</ns1:DESCR> <ns1:END_T>2007-07-31T12:00:00.000+5:30</ns1:END_T> <ns1:POID>A123</ns1:POID> <ns1:PROGRAM_NAME>100</ns1:PROGRAM_NAME> <ns1:SERVICE_OBJ>NA</ns1:SERVICE_OBJ> <ns1:SESSION_OBJ>NA</ns1:SESSION_OBJ> <ns1:START_T>2007-07-31T11:00:00.000+5:30</ns1:START_T> <ns1:STR_VERSION>527</ns1:STR_VERSION> <ns1:STRING_ID>528</ns1:STRING_ID> <ns1:SUB_BALANCES elem="530"> <ns1:CONTRIBUTOR_STR>Diagnostics</ns1:CONTRIBUTOR_STR> <ns1:ROLLOVER_DATA>1</ns1:ROLLOVER_DATA> <ns1:VALID_FROM>2007-07-31T11:00:00.000+5:30</ns1:VALID_FROM> <ns1:VALID_TO>2007-07-31T11:00:00.000+5:30</ns1:VALID_TO> </ns1:SUB_BALANCES> </ns1:PCM_OP_BILL_DEBIT_inputFlist> </soap:Body> </soap:Envelope>','<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header/> <env:Body> <PCM_OP_BILL_DEBIT_outputFlist xmlns:ns0="http://xmlns.oracle.com/BRM/schemas/BusinessOpcodes" xmlns="http://xmlns.oracle.com/BRM/schemas/BusinessOpcodes"> <ns0:POID>Transformed POID value : A123</ns0:POID> <ns0:RESULTS elem="Transformed Element value : 523"/> </PCM_OP_BILL_DEBIT_outputFlist> </env:Body> </env:Envelope>',null,0,null,null,null,null,'Diagnostics Transformation',null,'DiagTransformationBPEL','1.0',null,null,'AIA Diagnostics',null,null,null,null,null,to_date('01-OCT-07','DD-MON-RR'),'oc4jadmin')
    [exec] [sql] java.sql.SQLException: ORA-01843: not a valid month
    [exec] [sql] Failed to execute: Insert into CAVS_DEFINITION_NSXPATHS (DEFINITION_ID,NAMESPACE_ALIAS,NAMESPACE) values (501,'env','http://schemas.xmlsoap.org/soap/envelope/')
    [exec] [sql] java.sql.SQLException: ORA-02291: integrity constraint (AIA.DEFINITION_NSXPATHS_D_FK) violated - parent key not found
    [exec] [sql] *1 of 43 SQL statements executed successfully*
    Any advice to solve this issue?
    Thanks in advance.
    Regards,
    K.
    Edited by: KaRiNe_Fr on 3 juin 2009 01:55 createDiagnosticsCAVSData.sql instead of createBSRIntegScenarioTables.sql...

    Hello,
    me again...
    Is this table CAVS_DEFINITIONS important to be populated for the rest of the AIA installation?
    The installation keeps on failing and it is a real issue for us...
    If of any use, here are some results from SQL requests onto our AIA database:
    SQL> SELECT * FROM NLS_DATABASE_PARAMETERS ;
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET WE8ISO8859P15
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD.MM.YYYY
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    PARAMETER VALUE
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_RDBMS_VERSION 10.2.0.4.0
    20 rows selected.
    SQL> select to_date('01-OCT-07','DD-MON-RR') from dual;
    TO_DATE('
    01-OCT-07
    Regards,
    KaRiNe.
    Edited by: KaRiNe_Fr on 3 juin 2009 01:59

  • ORA-02291 SQL EXCEPTION

    I have one table name Route(RouteID NUMBER Primary Key,RouteName VARCHAR2)
    I have one more Table Destination(DestId NUMBER f reference oreignKey(RouteID)).
    I am going to Insert Data into the Destination Table Without having an entry In route Table.Then,I am getting an Exception ORA-02291 Parent Key Was not Found.I have tried to handle that Exception.but im not able to handle that Exception.I want to know how to Handle that Exception.?..Please give me some Suggestions...

    I don't think you can cause its a parent key violation.
    Do you want to store the ora_errors exceptions?You need to embed that in PL?SQL and create a log table.
    Procedure insert_into_destination_table IS
              start_time date :=sysdate;
              proc_name varchar2(40) :='Insert_into_destination_table';
              cnt integer :=0;
    Begin
    insert into      Table Destination
    values('AAA');
         add_log(proc_name, cnt, start_time, 'Finish!');
              EXCEPTION
                   WHEN OTHERS THEN
                        rollback;
                   add_log(proc_name, cnt, start_time, substr(SQLCODE||' '||SQLERRM, 1, 199));     
    Cheers!

  • ORA-02291 Integrity Constraint exception - 1:1 in BPEL context

    Hi,
    I am using toplink inside a BPEL process (DB adapter).
    I have a table PARTY with PK PARTY_ID and a table BILL_TO_CUSTOMER with PK BILL_TO_CUSTOMER_ID. They can be linked 1:1 using PARTY_ID = BILL_TO_CUSTOMER_ID. It works absolutely fine for update or select operations, but for inserts (using merge) NOT. I get an ORA-02291 error. From the log where I can see the tried SQL command the reason is obvious: He is trying to insert the BILL_TO_CUSTOMER before the PARTY and this does not work as there is a constraint.
    How do I have to change my toplink_mapping XML to get this working?
    Thank you very much, Best Regards,
    Martin
    <?xml version="1.0" encoding="UTF-8"?>
    <toplink:object-persistence version="Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)" xmlns:opm="http://xmlns.oracle.com/ias/xsds/opm" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:toplink="http://xmlns.oracle.com/ias/xsds/toplink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <opm:name>BillToCustomerParty</opm:name>
    <opm:class-mapping-descriptors>
    <opm:class-mapping-descriptor xsi:type="toplink:relational-class-mapping-descriptor">
    <opm:class>BillToCustomerParty.BillToCustomer</opm:class>
    <opm:alias>BillToCustomer</opm:alias>
    <opm:primary-key>
    <opm:field table="BILL_TO_CUSTOMER" name="BILL_TO_CUSTOMER_PARTY_ID" xsi:type="opm:column"/>
    </opm:primary-key>
    <opm:events xsi:type="toplink:event-policy"/>
    <opm:querying xsi:type="toplink:query-policy">
    <opm:queries>
    <opm:query name="findAllBillToCustomer" xsi:type="toplink:read-all-query">
    <toplink:timeout>0</toplink:timeout>
    <toplink:reference-class>BillToCustomerParty.BillToCustomer</toplink:reference-class>
    <toplink:cache-usage>primary-key</toplink:cache-usage>
    <toplink:lock-mode>none</toplink:lock-mode>
    <toplink:container xsi:type="toplink:list-container-policy">
    <toplink:collection-type>java.util.Vector</toplink:collection-type>
    </toplink:container>
    </opm:query>
    </opm:queries>
    <toplink:does-exist-query xsi:type="toplink:does-exist-query">
    <toplink:existence-check>check-database</toplink:existence-check>
    </toplink:does-exist-query>
    </opm:querying>
    <opm:attribute-mappings>
    <opm:attribute-mapping xsi:type="toplink:one-to-many-mapping">
    <opm:attribute-name>contactInformationCollection</opm:attribute-name>
    <opm:reference-class>BillToCustomerParty.ContactInformation</opm:reference-class>
    <opm:private-owned>true</opm:private-owned>
    <opm:target-foreign-key>
    <opm:field-reference>
    <opm:source-field table="CONTACT_INFORMATION" name="PARTY_ID" xsi:type="opm:column"/>
    <opm:target-field table="BILL_TO_CUSTOMER" name="BILL_TO_CUSTOMER_PARTY_ID" xsi:type="opm:column"/>
    </opm:field-reference>
    </opm:target-foreign-key>
    <toplink:batch-reading>true</toplink:batch-reading>
    <toplink:container xsi:type="toplink:container-policy">
    <toplink:collection-type>oracle.toplink.indirection.IndirectList</toplink:collection-type>
    </toplink:container>
    <toplink:indirection xsi:type="toplink:transparent-collection-indirection-policy"/>
    <toplink:selection-query xsi:type="toplink:read-all-query">
    <toplink:reference-class>BillToCustomerParty.ContactInformation</toplink:reference-class>
    <toplink:container xsi:type="toplink:container-policy">
    <toplink:collection-type>oracle.toplink.indirection.IndirectList</toplink:collection-type>
    </toplink:container>
    </toplink:selection-query>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>billToCustomerPartyId</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="BILL_TO_CUSTOMER_PARTY_ID" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.Integer</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>externalBillToCustomerId</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="EXTERNAL_BILL_TO_CUSTOMER_ID" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>hashAlgorithmValue</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="HASH_ALGORITHM_VALUE" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>lastName</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="LAST_NAME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>firstName</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="FIRST_NAME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>middleName</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="MIDDLE_NAME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>nameSuffix</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="NAME_SUFFIX" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>namePrefix</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="NAME_PREFIX" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>customerOrganizationName</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="CUSTOMER_ORGANIZATION_NAME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressOrganizationName</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="ADDRESS_ORGANIZATION_NAME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressDepartment</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="ADDRESS_DEPARTMENT" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressContactName</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="ADDRESS_CONTACT_NAME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressBuilding</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="ADDRESS_BUILDING" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressStreet</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="ADDRESS_STREET" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressHouseNumber</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="ADDRESS_HOUSE_NUMBER" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressPoBox</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="ADDRESS_PO_BOX" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressLocality</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="ADDRESS_LOCALITY" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressPostalCode</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="ADDRESS_POSTAL_CODE" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressProvince</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="ADDRESS_PROVINCE" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressFormatted</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="ADDRESS_FORMATTED" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>genderType</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="GENDER_TYPE" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>dateOfBirth</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="DATE_OF_BIRTH" xsi:type="opm:column"/>
    <opm:attribute-classification>java.sql.Timestamp</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>clientOrganizationPartyId</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="CLIENT_ORGANIZATION_PARTY_ID" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.Integer</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>phoneNumber</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="PHONE_NUMBER" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>faxNumber</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="FAX_NUMBER" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>mobileNumber</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="MOBILE_NUMBER" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>emailAddress</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="EMAIL_ADDRESS" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>lastUpdated</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="LAST_UPDATED" xsi:type="opm:column"/>
    <opm:attribute-classification>java.sql.Timestamp</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressCountryId</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="ADDRESS_COUNTRY_ID" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.Integer</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>currentContactInformationId</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER" name="CURRENT_CONTACT_INFORMATION_ID" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.Integer</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:one-to-one-mapping">
    <opm:attribute-name>billToCustomerGroup</opm:attribute-name>
    <opm:reference-class>BillToCustomerParty.BillToCustomerGroup</opm:reference-class>
    <opm:foreign-key>
    <opm:field-reference>
    <opm:source-field table="BILL_TO_CUSTOMER" name="BILL_TO_CUSTOMER_GROUP_ID" xsi:type="opm:column"/>
    <opm:target-field table="BILL_TO_CUSTOMER_GROUP" name="BILL_TO_CUSTOMER_GROUP_ID" xsi:type="opm:column"/>
    </opm:field-reference>
    </opm:foreign-key>
    <opm:foreign-key-fields>
    <opm:field table="BILL_TO_CUSTOMER" name="BILL_TO_CUSTOMER_GROUP_ID" xsi:type="opm:column"/>
    </opm:foreign-key-fields>
    <toplink:batch-reading>true</toplink:batch-reading>
    <toplink:selection-query xsi:type="toplink:read-object-query">
    <toplink:reference-class>BillToCustomerParty.BillToCustomerGroup</toplink:reference-class>
    </toplink:selection-query>
    </opm:attribute-mapping>
    </opm:attribute-mappings>
    <toplink:descriptor-type>independent</toplink:descriptor-type>
    <toplink:caching>
    <toplink:cache-type>weak-reference</toplink:cache-type>
    <toplink:always-refresh>true</toplink:always-refresh>
    </toplink:caching>
    <toplink:remote-caching>
    <toplink:cache-type>weak-reference</toplink:cache-type>
    </toplink:remote-caching>
    <toplink:instantiation/>
    <toplink:copying xsi:type="toplink:instantiation-copy-policy"/>
    <toplink:change-policy xsi:type="toplink:deferred-detection-change-policy"/>
    <toplink:tables>
    <toplink:table name="BILL_TO_CUSTOMER"/>
    </toplink:tables>
    </opm:class-mapping-descriptor>
    <opm:class-mapping-descriptor xsi:type="toplink:relational-class-mapping-descriptor">
    <opm:class>BillToCustomerParty.BillToCustomerGroup</opm:class>
    <opm:alias>BillToCustomerGroup</opm:alias>
    <opm:primary-key>
    <opm:field table="BILL_TO_CUSTOMER_GROUP" name="BILL_TO_CUSTOMER_GROUP_ID" xsi:type="opm:column"/>
    </opm:primary-key>
    <opm:events xsi:type="toplink:event-policy"/>
    <opm:querying xsi:type="toplink:query-policy">
    <opm:queries>
    <opm:query name="findAllBillToCustomerGroup" xsi:type="toplink:read-all-query">
    <toplink:timeout>0</toplink:timeout>
    <toplink:reference-class>BillToCustomerParty.BillToCustomerGroup</toplink:reference-class>
    <toplink:cache-usage>primary-key</toplink:cache-usage>
    <toplink:lock-mode>none</toplink:lock-mode>
    <toplink:container xsi:type="toplink:list-container-policy">
    <toplink:collection-type>java.util.Vector</toplink:collection-type>
    </toplink:container>
    </opm:query>
    </opm:queries>
    <toplink:does-exist-query xsi:type="toplink:does-exist-query">
    <toplink:existence-check>check-database</toplink:existence-check>
    </toplink:does-exist-query>
    </opm:querying>
    <opm:attribute-mappings>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>billToCustomerGroupId</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER_GROUP" name="BILL_TO_CUSTOMER_GROUP_ID" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.Integer</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>clientOrganizationPartyId</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER_GROUP" name="CLIENT_ORGANIZATION_PARTY_ID" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.Integer</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>description</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER_GROUP" name="DESCRIPTION" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>code</opm:attribute-name>
    <opm:field table="BILL_TO_CUSTOMER_GROUP" name="CODE" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    </opm:attribute-mappings>
    <toplink:descriptor-type>independent</toplink:descriptor-type>
    <toplink:caching>
    <toplink:cache-type>weak-reference</toplink:cache-type>
    <toplink:always-refresh>true</toplink:always-refresh>
    </toplink:caching>
    <toplink:remote-caching>
    <toplink:cache-type>weak-reference</toplink:cache-type>
    </toplink:remote-caching>
    <toplink:instantiation/>
    <toplink:copying xsi:type="toplink:instantiation-copy-policy"/>
    <toplink:change-policy xsi:type="toplink:deferred-detection-change-policy"/>
    <toplink:tables>
    <toplink:table name="BILL_TO_CUSTOMER_GROUP"/>
    </toplink:tables>
    </opm:class-mapping-descriptor>
    <opm:class-mapping-descriptor xsi:type="toplink:relational-class-mapping-descriptor">
    <opm:class>BillToCustomerParty.ContactInformation</opm:class>
    <opm:alias>ContactInformation</opm:alias>
    <opm:primary-key>
    <opm:field table="CONTACT_INFORMATION" name="CONTACT_INFORMATION_ID" xsi:type="opm:column"/>
    </opm:primary-key>
    <opm:events xsi:type="toplink:event-policy"/>
    <opm:querying xsi:type="toplink:query-policy">
    <opm:queries>
    <opm:query name="findAllContactInformation" xsi:type="toplink:read-all-query">
    <toplink:timeout>0</toplink:timeout>
    <toplink:reference-class>BillToCustomerParty.ContactInformation</toplink:reference-class>
    <toplink:cache-usage>primary-key</toplink:cache-usage>
    <toplink:lock-mode>none</toplink:lock-mode>
    <toplink:container xsi:type="toplink:list-container-policy">
    <toplink:collection-type>java.util.Vector</toplink:collection-type>
    </toplink:container>
    </opm:query>
    </opm:queries>
    <toplink:does-exist-query xsi:type="toplink:does-exist-query">
    <toplink:existence-check>check-database</toplink:existence-check>
    </toplink:does-exist-query>
    </opm:querying>
    <opm:attribute-mappings>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>hashAlgorithmValue</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="HASH_ALGORITHM_VALUE" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>lastName</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="LAST_NAME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>firstName</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="FIRST_NAME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>middleName</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="MIDDLE_NAME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>nameSuffix</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="NAME_SUFFIX" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>namePrefix</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="NAME_PREFIX" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>organizationName</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="ORGANIZATION_NAME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressOrganizationName</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="ADDRESS_ORGANIZATION_NAME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressDepartment</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="ADDRESS_DEPARTMENT" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressContactName</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="ADDRESS_CONTACT_NAME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressBuilding</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="ADDRESS_BUILDING" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressStreet</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="ADDRESS_STREET" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressHouseNumber</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="ADDRESS_HOUSE_NUMBER" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressPoBox</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="ADDRESS_PO_BOX" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressLocality</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="ADDRESS_LOCALITY" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressPostalCode</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="ADDRESS_POSTAL_CODE" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressProvince</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="ADDRESS_PROVINCE" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressFormatted</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="ADDRESS_FORMATTED" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>contactInformationId</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="CONTACT_INFORMATION_ID" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.Integer</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>datetimeReceived</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="DATETIME_RECEIVED" xsi:type="opm:column"/>
    <opm:attribute-classification>java.sql.Timestamp</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>dateOfBirth</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="DATE_OF_BIRTH" xsi:type="opm:column"/>
    <opm:attribute-classification>java.sql.Timestamp</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>genderType</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="GENDER_TYPE" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>phoneNumber</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="PHONE_NUMBER" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>faxNumber</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="FAX_NUMBER" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>mobileNumber</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="MOBILE_NUMBER" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>emailAddress</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="EMAIL_ADDRESS" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>addressCountryId</opm:attribute-name>
    <opm:field table="CONTACT_INFORMATION" name="ADDRESS_COUNTRY_ID" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.Integer</opm:attribute-classification>
    </opm:attribute-mapping>
    </opm:attribute-mappings>
    <toplink:descriptor-type>independent</toplink:descriptor-type>
    <toplink:caching>
    <toplink:cache-type>weak-reference</toplink:cache-type>
    <toplink:always-refresh>true</toplink:always-refresh>
    </toplink:caching>
    <toplink:remote-caching>
    <toplink:cache-type>weak-reference</toplink:cache-type>
    </toplink:remote-caching>
    <toplink:instantiation/>
    <toplink:copying xsi:type="toplink:instantiation-copy-policy"/>
    <toplink:change-policy xsi:type="toplink:deferred-detection-change-policy"/>
    <toplink:tables>
    <toplink:table name="CONTACT_INFORMATION"/>
    </toplink:tables>
    </opm:class-mapping-descriptor>
    <opm:class-mapping-descriptor xsi:type="toplink:relational-class-mapping-descriptor">
    <opm:class>BillToCustomerParty.Party</opm:class>
    <opm:alias>Party</opm:alias>
    <opm:primary-key>
    <opm:field table="PARTY" name="PARTY_ID" xsi:type="opm:column"/>
    </opm:primary-key>
    <opm:events xsi:type="toplink:event-policy"/>
    <opm:querying xsi:type="toplink:query-policy">
    <opm:queries>
    <opm:query name="BillToCustomerPartySelect" xsi:type="toplink:read-all-query">
    <opm:criteria operator="and" xsi:type="toplink:logic-expression">
    <toplink:left operator="equal" xsi:type="toplink:relation-expression">
    <toplink:left name="clientOrganizationPartyId" xsi:type="toplink:query-key-expression">
    <toplink:base name="billToCustomer" xsi:type="toplink:query-key-expression">
    <toplink:base xsi:type="toplink:base-expression"/>
    </toplink:base>
    </toplink:left>
    <toplink:right xsi:type="toplink:parameter-expression">
    <toplink:parameter name="clientOrganizationId" xsi:type="opm:column"/>
    </toplink:right>
    </toplink:left>
    <toplink:right operator="equal" xsi:type="toplink:relation-expression">
    <toplink:left name="externalBillToCustomerId" xsi:type="toplink:query-key-expression">
    <toplink:base name="billToCustomer" xsi:type="toplink:query-key-expression">
    <toplink:base xsi:type="toplink:base-expression"/>
    </toplink:base>
    </toplink:left>
    <toplink:right xsi:type="toplink:parameter-expression">
    <toplink:parameter name="externalBillToCustomerId" xsi:type="opm:column"/>
    </toplink:right>
    </toplink:right>
    </opm:criteria>
    <opm:arguments>
    <opm:argument name="externalBillToCustomerId">
    <opm:type>java.lang.String</opm:type>
    </opm:argument>
    <opm:argument name="clientOrganizationId">
    <opm:type>java.lang.Integer</opm:type>
    </opm:argument>
    </opm:arguments>
    <toplink:timeout>0</toplink:timeout>
    <toplink:reference-class>BillToCustomerParty.Party</toplink:reference-class>
    <toplink:cache-usage>primary-key</toplink:cache-usage>
    <toplink:lock-mode>none</toplink:lock-mode>
    <toplink:container xsi:type="toplink:list-container-policy">
    <toplink:collection-type>java.util.Vector</toplink:collection-type>
    </toplink:container>
    </opm:query>
    <opm:query name="findAllParty" xsi:type="toplink:read-all-query">
    <toplink:timeout>0</toplink:timeout>
    <toplink:reference-class>BillToCustomerParty.Party</toplink:reference-class>
    <toplink:cache-usage>primary-key</toplink:cache-usage>
    <toplink:lock-mode>none</toplink:lock-mode>
    <toplink:container xsi:type="toplink:list-container-policy">
    <toplink:collection-type>java.util.Vector</toplink:collection-type>
    </toplink:container>
    </opm:query>
    </opm:queries>
    <toplink:does-exist-query xsi:type="toplink:does-exist-query">
    <toplink:existence-check>check-database</toplink:existence-check>
    </toplink:does-exist-query>
    </opm:querying>
    <opm:attribute-mappings>
    <opm:attribute-mapping xsi:type="toplink:one-to-one-mapping">
    <opm:attribute-name>billToCustomer</opm:attribute-name>
    <opm:reference-class>BillToCustomerParty.BillToCustomer</opm:reference-class>
    <opm:foreign-key>
    <opm:field-reference>
    <opm:source-field table="PARTY" name="PARTY_ID" xsi:type="opm:column"/>
    <opm:target-field table="BILL_TO_CUSTOMER" name="BILL_TO_CUSTOMER_PARTY_ID" xsi:type="opm:column"/>
    </opm:field-reference>
    </opm:foreign-key>
    <opm:foreign-key-fields>
    <opm:field table="PARTY" name="PARTY_ID" xsi:type="opm:column"/>
    </opm:foreign-key-fields>
    <toplink:batch-reading>true</toplink:batch-reading>
    <toplink:indirection xsi:type="toplink:value-holder-indirection-policy"/>
    <toplink:selection-query xsi:type="toplink:read-object-query">
    <toplink:reference-class>BillToCustomerParty.BillToCustomer</toplink:reference-class>
    </toplink:selection-query>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>partyId</opm:attribute-name>
    <opm:read-only>true</opm:read-only>
    <opm:field table="PARTY" name="PARTY_ID" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.Integer</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>partyTypeId</opm:attribute-name>
    <opm:field table="PARTY" name="PARTY_TYPE_ID" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.Integer</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>activeInd</opm:attribute-name>
    <opm:field table="PARTY" name="ACTIVE_IND" xsi:type="opm:column"/>
    <opm:attribute-classification>java.lang.String</opm:attribute-classification>
    </opm:attribute-mapping>
    <opm:attribute-mapping xsi:type="toplink:direct-mapping">
    <opm:attribute-name>createdDatetime</opm:attribute-name>
    <opm:field table="PARTY" name="CREATED_DATETIME" xsi:type="opm:column"/>
    <opm:attribute-classification>java.sql.Timestamp</opm:attribute-classification>
    </opm:attribute-mapping>
    </opm:attribute-mappings>
    <toplink:descriptor-type>independent</toplink:descriptor-type>
    <toplink:caching>
    <toplink:cache-type>weak-reference</toplink:cache-type>
    <toplink:always-refresh>true</toplink:always-refresh>
    </toplink:caching>
    <toplink:remote-caching>
    <toplink:cache-type>weak-reference</toplink:cache-type>
    </toplink:remote-caching>
    <toplink:instantiation/>
    <toplink:copying xsi:type="toplink:instantiation-copy-policy"/>
    <toplink:change-policy xsi:type="toplink:deferred-detection-change-policy"/>
    <toplink:tables>
    <toplink:table name="PARTY"/>
    </toplink:tables>
    </opm:class-mapping-descriptor>
    </opm:class-mapping-descriptors>
    </toplink:object-persistence>

    I am replying to very old reported problem, since i struggled to get the right reason for this error.
    In my database we had database constraint & associated trigger, On Insert the trigger gets Sequence. NextVal and inserts into PK column. This constraint trigger gets conflict with the Oracle Native Sequence Generator. I disabled the trigger and used my ESB native sequence (which also does sequence.nextVal) and it worked perfectly.
    If the trigger is Must then make sure that there is If condition wherein it checks to set NextVal only if no input has been provided for PK. If input contains PK value then trigger should do nothing.

  • ORA-02291 Error on delete with cascade

    Hello guys! I have a mastertable called TBL_VEG_MAINDATA (PK cnt_veg_maindata) and a subtable TBL_VEG_SUBDATA, which references the parent pk column using a foreign key. The foreign key is set to cascade on delete. Hence when I delete a parent entry, all related datsets in my subtable should be automatically deleted as well. Nevertheless, whenever I delete a parent record from TBL_VEG_MAINDATA, I stumble upon an integrity constraint (parent key not found).
    In fact I expect the rdbms to automatically forward the delete request to the subtable when the parent dataset is deleted.
    Do you have an idea what I am doing wrong?
    A million thanks in advance!
    Brgds,
    Seb

    Hi SBH!
    Thanks for your answer! I posted the complete table definitions below, including constraints and triggers in order to avoid missing anything!
    I have no clue as to why it doesn't work in this case. Never had this problem before.
    CREATE TABLE  "TBL_VEG_MAINDATA"
       (     "CNT_VEG_MAINDATA" NUMBER NOT NULL ENABLE,
         "LNG_GEBIET" VARCHAR2(10 CHAR) NOT NULL ENABLE,
         "STR_LRT_CLASS" VARCHAR2(8 CHAR) NOT NULL ENABLE,
         "INT_BEARBEITER" NUMBER(3,0),
         "INT_SEALEVEL" NUMBER(4,0),
         "STR_EXPOSITION" VARCHAR2(2 CHAR),
         "INT_INKLINATION" NUMBER(8,0),
         "STR_COMMENT" VARCHAR2(255 CHAR),
         "INT_VEG_RECORD" NUMBER(2,0) NOT NULL ENABLE,
         "DATE_SAVEDATE" DATE,
         "INT_TK" NUMBER(8,0),
         "INT_R" NUMBER(8,0),
         "INT_H" NUMBER(8,0),
         "INT_FLAECHE" NUMBER(5,2),
         "STR_COVERAGE_COMMENT" VARCHAR2(255 CHAR),
         "STR_VERFAHREN" VARCHAR2(3),
          CONSTRAINT "TBL_VEG_MAINDATA_PK" PRIMARY KEY ("CNT_VEG_MAINDATA") ENABLE,
          CONSTRAINT "CON_UQ_TBL_VEG_MAINDATA" UNIQUE ("LNG_GEBIET", "STR_LRT_CLASS", "INT_VEG_RECORD", "STR_VERFAHREN") ENABLE
    ALTER TABLE  "TBL_VEG_MAINDATA" ADD CONSTRAINT "CON_FK_TBL_MAINDATA" FOREIGN KEY ("LNG_GEBIET")
           REFERENCES  "TBL_GEBIET" ("CNT_GEBIET") ON DELETE CASCADE ENABLE
    CREATE INDEX  "IDX1_TBL_VEG_MAINDATA" ON  "TBL_VEG_MAINDATA" ("LNG_GEBIET", "STR_LRT_CLASS")
    CREATE INDEX  "IDX2_VEG_MAINDATA" ON  "TBL_VEG_MAINDATA" ("INT_BEARBEITER", "INT_SEALEVEL", "STR_EXPOSITION", "INT_INKLINATION")
    CREATE OR REPLACE TRIGGER  "TR_IN_TBL_VEG_MAINDATA"
      before insert on "TBL_VEG_MAINDATA"             
      for each row
    begin 
      if :new."CNT_VEG_MAINDATA" is null then
        select "SEQ_TBL_VEG_MAIN".nextval into :new."CNT_VEG_MAINDATA" from dual;
      end if;
    end;and for th subtable
    CREATE TABLE  "TBL_VEG_SUBDATA"
       (     "CNT_VEG_SUBDATA" NUMBER NOT NULL ENABLE,
         "INT_VEG_ART" NUMBER(4,0),
         "LNG_VEG_MAINDATA" NUMBER(10,0) NOT NULL ENABLE,
         "INT_DECKUNGSGRAD" NUMBER(1,0),
          CONSTRAINT "TBL_VEG_SUBDATA_PK" PRIMARY KEY ("CNT_VEG_SUBDATA") ENABLE
    ALTER TABLE  "TBL_VEG_SUBDATA" ADD CONSTRAINT "CON_FK_TBL_VEG_SUBDATA" FOREIGN KEY ("LNG_VEG_MAINDATA")
           REFERENCES  "TBL_VEG_MAINDATA" ("CNT_VEG_MAINDATA") ON DELETE CASCADE ENABLE
    CREATE OR REPLACE TRIGGER  "TR_IN_TBL_VEG_SUBDATA"
      before insert on "TBL_VEG_SUBDATA"             
      for each row
    begin 
      if :new."CNT_VEG_SUBDATA" is null then
        select "SEQ_TBL_VEG_SUBDATA".nextval into :new."CNT_VEG_SUBDATA" from dual;
      end if;
    end;
    /Maybe you'll I see soemthing I missed...
    Thanks for your effort.
    Rgds,
    Seb

  • MAPPING DEBBUG ERROR: ORA-02291(data column format)

    I think the problem is the data format...
    in csv files I have dd/mm/yyyy, and i set the mask in the flat file import like this dd/mm/yyyy, but when I debbug I receeive constraint violation parent key not found, the sonstraint is ok, how I must set the data column? and how I must set it in excel.
    please someone help me, it's 5 days I have this problem and I can't make another think.
    Thanks

    Hi Marvin,
    Was this issue resolved? If so, how did you fix it? I am receiving the same error with the *MVAL function.
    Thanks,
    Hitesh

  • Users getting APP-FND-01934:ora-00001 unique constraint

    users getting APP-FND-01934:ora-00001 unique constraint(ENI.ENI_OLTP_ITEM_STAR_U3) violated in package ENI_ITEMS_STAR_PKG Procedure INsERT_ITEMS_IN_STAR on Master ITEM's in 11i EBS.

    Please see these MOS Docs.
    APP-FND-01934 ORA-00001 Error Occurs When Creating Items [ID 1072935.1]
    APP-FND-01934 ORA-00001: Unique Constraint Error at Master Items [ID 465008.1]
    ORA-02291: Integrity Constraint (GMI.IC_LOTS_MST_IC_ITEM_MST_B_FK) Violated [ID 302368.1]
    Thanks,
    Hussein

Maybe you are looking for

  • Adding memory modules...

    I am currently running leopard on a 1st generation Mac pro with 4GB of ram from ramjet.com. I would like to add more ram to to it and am a little confused. To get maximum performace, I unerstand I fill all the memory slots. I am thinking about adding

  • Primavera P6 8.4 Patch 1 errors

    Hello, I bought P6 Professional standalone version 8.3 and then upgraded to 8.4. I am trying to install patch 1 now and have got two questions for it. Q1 - While trying to install Patch 1, the setup wizard ends prematurely due to an error (no details

  • How to print two alv lists in one spool request

    Hello, I have made a report which has one alv list based on CL_SALV_TABLE and a message box displayed in a splitter container based on SBAL. In dialog mode everything is fine. If I run the report in batch mode, I have put the alv table to list_displa

  • Huge iDVD archived files

    I encoded an iMovie project with iDVD 5. The iMovie DV files are about 7GB, and iDVD can perfectly fit them onto a 4GB DVD. I decided to save the project with the "Archive Project" option with the encoded files. Why does the estimated size to archive

  • Manual selection of production version in REM scenario.

    Hai gurus, I discrete manufacturing we  can several production versions and we can select the same manually when we convert planned order to production order. Like this whether it is possible in REM scenario to select the production version manually,