Creating Master And Detail Record Simultaneously Fails With InvalidOwnerException JBO-25030 (Doc ID 1058236.1)

Last updated on MARCH 08, 2017

Applies to:

Oracle JDeveloper - Version 11.1.1.2.0 and later
Information in this document applies to any platform.
***Checked for relevance on 10-Jan-2013***

Symptoms

You are trying to create a Master and a Detail record simultaneously with the following code:

    public String createMasterDetail() {

        BindingContainer bindings = getBindings();
        OperationBinding operationBinding =
            bindings.getOperationBinding("CreateInsertMaster");
        Object result = operationBinding.execute();

        OperationBinding operationBinding1 =
            bindings.getOperationBinding("CreateInsertDetail");
        result = operationBinding1.execute();

        return null;
    }


You correctly set up the Association as a Composition, as explained in the
"Fusion Developer's Guide for Oracle Application Development Framework",
topic "4.10.13 How to Configure Composition Behavior"

However, when you click the button to create the records, you get the following error displayed.

Detail entity <Detail> with row key oracle.jbo.Key[<negative number>] cannot find or invalidate its owning entity.


and the following stack trace:

oracle.jbo.InvalidOwnerException: JBO-25030: Detail entity Departments with row key oracle.jbo.Key[-5 ] cannot find or invalidate its owning entity.
    at oracle.jbo.server.EntityImpl.internalCreate(EntityImpl.java:1081)
    at oracle.jbo.server.EntityImpl.create(EntityImpl.java:821)
    at oracle.jbo.server.EntityImpl.callCreate(EntityImpl.java:946)
    at oracle.jbo.server.ViewRowStorage.create(ViewRowStorage.java:1143)
    at oracle.jbo.server.ViewRowImpl.create(ViewRowImpl.java:428)
    at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:445)
    at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:4915)
    at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1843)
    at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2367)
    at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2408)
    at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:2389)




Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms