Hibernate报错:org.hibernate.ObjectNotFoundException: No row with the given identifier exists 解决办法

报错信息

org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.jbpm.pvm.internal.model.ExecutionImpl#78781405]
	at org.hibernate.impl.SessionFactoryImpl$2.handleEntityNotFound(SessionFactoryImpl.java:419)
	at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:171)
	at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:223)
	at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:126)
	at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:906)
	at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:874)
	at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:590)
	at org.hibernate.type.EntityType.resolve(EntityType.java:412)
	at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:139)
	at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:877)
	at org.hibernate.loader.Loader.doQuery(Loader.java:752)
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
	at org.hibernate.loader.Loader.doList(Loader.java:2232)
	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)
	at org.hibernate.loader.Loader.list(Loader.java:2124)
	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
	at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1149)
	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
	at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:835)
	at org.jbpm.pvm.internal.hibernate.DbSessionImpl.findFirstAcquirableJob(DbSessionImpl.java:444)
	at org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd.execute(AcquireJobsCmd.java:51)
	at org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd.execute(AcquireJobsCmd.java:29)
	at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
	at org.jbpm.pvm.internal.tx.SpringCommandCallback.doInTransaction(SpringCommandCallback.java:45)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
	at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:49)
	at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:58)
	at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:43)
	at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56)
	at org.jbpm.pvm.internal.jobexecutor.DispatcherThread.acquireJobs(DispatcherThread.java:210)
	at org.jbpm.pvm.internal.jobexecutor.DispatcherThread.run(DispatcherThread.java:114)
09:13:00,181  WARN DbSessionImpl:90 - Query SQL 'findFirstAcquirableJob' encounter some problem:

原因和解决方案

  1. 原因及其解决方案
    Hibernate报错:org.hibernate.ObjectNotFoundException: No row with the given identifier exists 解决办法
  2. 补充
    在报错信息的最后一行可以确认报错的sql语句是findFirstAcquirableJob
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页