How To Avoid JBO-25030 When Inserting New Records in a View Object With Multiple Entity Object Usages (Doc ID 561151.1)

Last updated on MARCH 08, 2017

Applies to:

Oracle JDeveloper - Version 10.1.3.3.0 to 12.1.2.0.0 [Release Oracle10g to 12c]
Information in this document applies to any platform.
*** Checked for relevance on 09-SEP-2013 ***

Goal

Suppose a Master-Detail View Object with multiple Entity Object usages, say Dept and Emp, both Updatable.
The Entity Objects are linked with a Composition Association  (with Cascade Delete/Update).
Updating and deleting existing data works fine, but creating new rows fails with the following errors:

oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity: detail entity Emp, row key null.
    at oracle.jbo.server.EntityImpl.internalCreate(EntityImpl.java:563)
    at oracle.jbo.server.EntityImpl.create(EntityImpl.java:427)
    at oracle.jbo.server.EntityImpl.callCreate(EntityImpl.java:445)
    at oracle.jbo.server.ViewRowStorage.create(ViewRowStorage.java:890)
    at oracle.jbo.server.ViewRowImpl.create(ViewRowImpl.java:340)
    at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:357)
    at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:2794)
    at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1304)
    at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:1869)
    at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:1910)
    at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:1891)
    at oracle.jbo.server.ViewObjectImpl.createRow(ViewObjectImpl.java:6580)
...



How to avoid this error ?

Solution

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