My Oracle Support Banner

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

Last updated on OCTOBER 21, 2022

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 primary entity using BPMasterEntitybase 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

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.