ECLIPSELINK-6044 Primary Keys Must Not Contain Null After Upgrade From WebLogic 10.3.4 To 10.3.6

(Doc ID 1918056.1)

Last updated on AUGUST 21, 2014

Applies to:

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

Symptoms

After upgrading from WebLogic 10.3.4 to 10.3.6, the following exception is seen with TopLink application:


[EL Warning]: 2014-05-26 10:26:43.033--UnitOfWork(20436132)--Exception [EclipseLink-6044] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.QueryException
Exception Description: The primary key read from the row [ArrayRecord(
  => 1
  => Mary)] during the execution of the query was detected to be null. Primary keys must not contain null.
Query: ReadAllQuery(referenceClass=Person sql="select * from PERSON")
Exception in thread "main" Local Exception Stack:
Exception [EclipseLink-6044] (Eclipse Persistence Services - 2.3.1.v20111018-r10
243): org.eclipse.persistence.exceptions.QueryException
Exception Description: The primary key read from the row [ArrayRecord(
  => 1
  => Mary)] during the execution of the query was detected to be null. Primary keys must not contain null.
Query: ReadAllQuery(referenceClass=Person sql="select * from PERSON")
  at org.eclipse.persistence.exceptions.QueryException.nullPrimaryKeyInBuildingObject(QueryException.java:895)
  at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:584)
  at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:560)
  at org.eclipse.persistence.queries.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:717)
  at org.eclipse.persistence.queries.ReadAllQuery.registerResultInUnitOfWork(ReadAllQuery.java:769)
  at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:433)
  at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1081)
  at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:844)
  at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1040)
  at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:392)
  at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1128)
  at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2871)
  at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1516)
  at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1498)
  at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1463)
  at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:485)
  at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:742)
  at test.NativeQueryTest.read(NativeQueryTest.java:47)
  at test.NativeQueryTest.main(NativeQueryTest.java:22)

   ::::::::::




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