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 and later
Information in this document applies to any platform.
***Checked for relevance on 10-Jan-2013***


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

    public String createMasterDetail() {

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

        OperationBinding operationBinding1 =
        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(
    at oracle.jbo.server.EntityImpl.create(
    at oracle.jbo.server.EntityImpl.callCreate(
    at oracle.jbo.server.ViewRowStorage.create(
    at oracle.jbo.server.ViewRowImpl.create(
    at oracle.jbo.server.ViewRowImpl.callCreate(
    at oracle.jbo.server.ViewObjectImpl.createInstance(
    at oracle.jbo.server.QueryCollection.createRowWithEntities(
    at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(
    at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(
    at oracle.jbo.server.ViewRowSetImpl.createRow(


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