Details
Description
2017-09-06 07:00:00.431 ERROR o.y.c.b.c.YcCronJob:66 - Job Inventory Awaiting Delivery Processing finished in error, cause: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): org.yes.cart.domain.entity.impl.SystemEntity#100
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): org.yes.cart.domain.entity.impl.SystemEntity#100
at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:2509) ~[hibernate-core-4.2.0.Final.jar:4.2.0.Final]
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3219) ~[hibernate-core-4.2.0.Final.jar:4.2.0.Final]
at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3117) ~[hibernate-core-4.2.0.Final.jar:4.2.0.Final]
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3446) ~[hibernate-core-4.2.0.Final.jar:4.2.0.Final]
at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:140) ~[hibernate-core-4.2.0.Final.jar:4.2.0.Final]
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362) ~[hibernate-core-4.2.0.Final.jar:4.2.0.Final]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354) ~[hibernate-core-4.2.0.Final.jar:4.2.0.Final]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:276) ~[hibernate-core-4.2.0.Final.jar:4.2.0.Final]
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:328) ~[hibernate-core-4.2.0.Final.jar:4.2.0.Final]
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52) ~[hibernate-core-4.2.0.Final.jar:4.2.0.Final]
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1233) ~[hibernate-core-4.2.0.Final.jar:4.2.0.Final]
at org.yes.cart.dao.impl.GenericDAOHibernateImpl.flush(GenericDAOHibernateImpl.java:1151) ~[persistence-3.3.1-SNAPSHOT.jar:3.3.1-SNAPSHOT]
at org.yes.cart.service.domain.impl.SystemServiceImpl.updateAttributeValue(SystemServiceImpl.java:159) ~[core-3.3.1-SNAPSHOT.jar:3.3.1-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_144]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_144]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_144]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_144]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) ~[spring-tx-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) ~[spring-tx-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) ~[spring-tx-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at com.sun.proxy.$Proxy189.updateAttributeValue(Unknown Source) ~[na:na]
at org.yes.cart.bulkjob.cron.PausableProcessorWrapperImpl.run(PausableProcessorWrapperImpl.java:47) ~[core-3.3.1-SNAPSHOT.jar:3.3.1-SNAPSHOT]
at org.yes.cart.bulkjob.cron.YcCronJob.executeInternal(YcCronJob.java:57) ~[core-module-job-3.3.1-SNAPSHOT.jar:3.3.1-SNAPSHOT]
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:113) [spring-context-support-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.quartz.core.JobRunShell.run(JobRunShell.java:199) [quartz-1.7.3.jar:na]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546) [quartz-1.7.3.jar:na]
public void run() {
if (!pauseInitialised) {
final String paused = systemService.createOrGetAttributeValue(pausePreferenceKey, "Boolean");
if (paused == null)
pauseInitialised = true;
}
final String paused = systemService.getAttributeValue(pausePreferenceKey);
if (Boolean.valueOf(paused)) {
LOG.debug("Job is PAUSED (pause key: {})", this.pausePreferenceKey);
return;
}
this.processor.run();
}