Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Inconsistent job execution state #3

Closed
fmbenhassine opened this issue Jun 27, 2017 · 0 comments
Closed

Inconsistent job execution state #3

fmbenhassine opened this issue Jun 27, 2017 · 0 comments
Labels
Milestone

Comments

@fmbenhassine
Copy link
Member

As of v0.1, when a job execution is fast enough, the job server cannot find a job execution for the executed job. Here is the exception:

org.springframework.dao.EmptyResultDataAccessException: No entity found for query; nested exception is javax.persistence.NoResultException: No entity found for query
	at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:392) ~[spring-orm-4.3.9.RELEASE.jar:4.3.9.RELEASE]
	at org.springframework.orm.hibernate5.HibernateExceptionTranslator.translateExceptionIfPossible(HibernateExceptionTranslator.java:55) ~[spring-orm-4.3.9.RELEASE.jar:4.3.9.RELEASE]
	at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:59) ~[spring-tx-4.3.9.RELEASE.jar:4.3.9.RELEASE]
	at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213) ~[spring-tx-4.3.9.RELEASE.jar:4.3.9.RELEASE]
	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:147) ~[spring-tx-4.3.9.RELEASE.jar:4.3.9.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) ~[spring-tx-4.3.9.RELEASE.jar:4.3.9.RELEASE]
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) ~[spring-tx-4.3.9.RELEASE.jar:4.3.9.RELEASE]
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) ~[spring-tx-4.3.9.RELEASE.jar:4.3.9.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673) ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
	at org.jeasy.jobs.execution.JobExecutionRepository$$EnhancerBySpringCGLIB$$529c1f6b.findByJobRequestId(<generated>) ~[classes/:na]
	at org.jeasy.jobs.job.JobService.updateJobExecutionAndItsCorrespondingRequest(JobService.java:62) ~[classes/:na]
	at org.jeasy.jobs.job.DefaultJob.call(DefaultJob.java:30) [classes/:na]
	at org.jeasy.jobs.job.DefaultJob.call(DefaultJob.java:9) [classes/:na]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_73]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_73]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_73]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_73]
Caused by: javax.persistence.NoResultException: No entity found for query
	at org.hibernate.query.internal.AbstractProducedQuery.getSingleResult(AbstractProducedQuery.java:1465) ~[hibernate-core-5.2.10.Final.jar:5.2.10.Final]
	at org.jeasy.jobs.execution.JobExecutionRepository.findByJobRequestId(JobExecutionRepository.java:25) ~[classes/:na]
	at org.jeasy.jobs.execution.JobExecutionRepository$$FastClassBySpringCGLIB$$2068fec7.invoke(<generated>) ~[classes/:na]
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.3.9.RELEASE.jar:4.3.9.RELEASE]
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738) ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136) ~[spring-tx-4.3.9.RELEASE.jar:4.3.9.RELEASE]
	... 14 common frames omitted
@fmbenhassine fmbenhassine added this to the 0.2 milestone Jun 27, 2017
fmbenhassine added a commit that referenced this issue Jun 27, 2017
…xecutions.

 This transaction should be committed before submitting jobs to the executor service
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant