Skip to main content



      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 07:13 Go to next message
Eclipse UserFriend
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 10:15 Go to previous message
Eclipse UserFriend
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?
Previous Topic:Query Hints - Multiple Formats?
Next Topic:stackOverFlowError
Goto Forum:
  


Current Time: Mon Jul 07 01:37:08 EDT 2025

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

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

Back to the top