最近,我在Hibernate中遇到了一个相当“奇怪”的问题(由于缺少更好的词)。尝试保留我的实体时,将引发以下警告/错误:
WARN [quartzScheduler_Worker-2] LoadContexts:122 - HHH000100: Fail-safe cleanup (collections) : org.hibernate.engine.loading.internal.CollectionLoadContext@4bf3ab85<rs=oracle.jdbc.driver.OracleResultSetImpl@1786369e>
WARN [quartzScheduler_Worker-2] CollectionLoadContext:351 - HHH000160: On CollectionLoadContext#cleanup, localLoadingCollectionKeys contained [1] entries
ERROR [quartzScheduler_Worker-2] AbstractArticleImportJob:288 - Failed to update article.
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [be.persgroep.red.mow.config.entities.hibernate.content.ArticleBlock#2349544]
Run Code Online (Sandbox Code Playgroud)
在此处发布其余的堆栈跟踪:
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [be.persgroep.red.mow.config.entities.hibernate.content.ArticleBlock#2349544]
at org.hibernate.internal.SessionFactoryImpl$1$1.handleEntityNotFound(SessionFactoryImpl.java:244) ~[hibernate-core-4.2.7.SP1.jar:4.2.7.SP1]
at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:212) ~[hibernate-core-4.2.7.SP1.jar:4.2.7.SP1]
at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:262) ~[hibernate-core-4.2.7.SP1.jar:4.2.7.SP1]
at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:150) ~[hibernate-core-4.2.7.SP1.jar:4.2.7.SP1]
at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1098) ~[hibernate-core-4.2.7.SP1.jar:4.2.7.SP1]
at org.hibernate.internal.SessionImpl.internalLoad(SessionImpl.java:1025) ~[hibernate-core-4.2.7.SP1.jar:4.2.7.SP1]
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:671) ~[hibernate-core-4.2.7.SP1.jar:4.2.7.SP1]
at org.hibernate.type.EntityType.resolve(EntityType.java:489) ~[hibernate-core-4.2.7.SP1.jar:4.2.7.SP1]
at org.hibernate.engine.internal.TwoPhaseLoad.doInitializeEntity(TwoPhaseLoad.java:168) ~[hibernate-core-4.2.7.SP1.jar:4.2.7.SP1]
at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:137) ~[hibernate-core-4.2.7.SP1.jar:4.2.7.SP1]
at …Run Code Online (Sandbox Code Playgroud)