Encounter Toplink-7197 - Null Primary Key In Unit Of Work Clone In TopLink 11g (Doc ID 1490385.1)

Last updated on SEPTEMBER 10, 2014

Applies to:

Oracle TopLink - Version 11.1.1.5.0 to 11.1.1.6.0 [Release Oracle11g]
Information in this document applies to any platform.

Symptoms

You upgraded Toplink application from 9.0.4 to 11.1.1.5 and changed the old deprecated/unavailable APIs to new APIs as per Toplink 11g documentation. "Null primary key" error is encountered when User created a master entity using BPMEntitybase with new child objects (POJO entity). Toplink considers this child object as an existing object and throws exception.

Null PK error is intermitternt.

This error appears only when the cache synchronization / coordination is enabled and NOT when the synchronization is turned off.


Error is as below:

Exception [TOPLINK-7197] (Oracle TopLink - 11g Release 1 (11.1.1.5.0) (Build 110305)): oracle.toplink.exceptions.ValidationException
Exception Description: Null primary key encountered in unit of work clone [xxx.xxx.xx.xx@50475047].
at oracle.toplink.exceptions.ValidationException.nullPrimaryKeyInUnitOfWorkClone(ValidationException.java:1276)
at oracle.toplink.descriptors.changetracking.DeferredChangeDetectionPolicy.calculateChanges(DeferredChangeDetectionPolicy.java:78)
at oracle.toplink.internal.sessions.UnitOfWorkImpl.calculateChanges(UnitOfWorkImpl.java:524)
at oracle.toplink.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1202)
at oracle.toplink.internal.sessions.UnitOfWorkImpl.issueSQLbeforeCompletion(UnitOfWorkImpl.java:2300)
at oracle.toplink.internal.sessions.UnitOfWorkImpl.issueSQLbeforeCompletion(UnitOfWorkImpl.java:2283)
. . .

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