Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Exception Description: Null primary key encountered in unit of work clone (Getting Null primary key encountered in unit of work clone )
Exception Description: Null primary key encountered in unit of work clone [message #803483] Tue, 21 February 2012 12:13 Go to next message
Pradeep R is currently offline Pradeep RFriend
Messages: 1
Registered: February 2012
Junior Member
Hi,

I am getting below error. I am using eclipse Persistence Services - 1.0.1.
We have deployed our application in client place and its running for about a year, yesterday we got the below error and when i searched in the form they say if PK is <=0 then we generally get the below error. I have cross verified the db and the PK does not have <=0 , Please advice. Any kind of help is appreciated.

Error:
======================================
Exception Description: Null primary key encountered in unit of work clone [com.arisglobal.sir.entites.study.SIRContactEntity@7d4372].
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:387)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.performPreQueryFlush(EJBQueryImpl.java:936)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:378)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:517)
at com.arisglobal.sir.distribution.services.impl.DistributionReportServiceImpl.autoReportDistribution(DistributionReportServiceImpl.java:2139)
at sun.reflect.GeneratedMethodAccessor308.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy107.autoReportDistribution(Unknown Source)
at sun.reflect.GeneratedMethodAccessor308.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy107.autoReportDistribution(Unknown Source)
at com.arisglobal.sir.helper.SchedulerHelper.autoReportDistribution(SchedulerHelper.java:516)
at com.arisglobal.sir.scheduler.tasks.DistributionJob.execute(DistributionJob.java:17)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
Caused by: Exception [EclipseLink-7197] (Eclipse Persistence Services - 1.0.1 (Build 20080905)): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Null primary key encountered in unit of work clone [com.arisglobal.sir.entites.study.SIRContactEntity@7d4372].
at org.eclipse.persistence.exceptions.ValidationException.nullPrimaryKeyInUnitOfWorkClone(ValidationException.java:1305)
at org.eclipse.persistence.descriptors.changetracking.DeferredChangeDetectionPolicy.calculateChanges(DeferredChangeDetectionPolicy.java:84)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.calculateChanges(UnitOfWorkImpl.java:557)
at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.writeChanges(RepeatableWriteUnitOfWork.java:293)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:384)
... 24 more
Re: Exception Description: Null primary key encountered in unit of work clone [message #804390 is a reply to message #803483] Wed, 22 February 2012 15:15 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

1.0.1 is a very old version. Can you try to see if the error occurs in a later version?

Did anything change in the application to get this error?
What value are you using for your Id, is it possible that you are using an int and have exceeded its max value?


James : Wiki : Book : Blog : Twitter
Previous Topic:Query Hints - Multiple Formats?
Next Topic:stackOverFlowError
Goto Forum:
  


Current Time: Tue Nov 12 07:45:14 GMT 2024

Powered by FUDForum. Page generated in 0.02914 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top