[ERROR] Rollback in HibernateStore: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [Nachricht#761e8c17-5aad-4154-96a1-55bc715999fe]
at org.hibernate.internal.SessionFactoryImpl$1$1.handleEntityNotFound(SessionFactoryImpl.java:245)
at org.hibernate.event.internal.DefaultLoadEventListener.returnNarrowedProxy(DefaultLoadEventListener.java:283)
at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:249)
at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:149)
at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:992)
at org.hibernate.internal.SessionImpl.access$1900(SessionImpl.java:170)
at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2336)
at org.hibernate.internal.SessionImpl.get(SessionImpl.java:892)
at org.eclipse.emf.cdo.server.internal.hibernate.HibernateUtil.getCDORevision(HibernateUtil.java:465)
at org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.HibernateMoveableListWrapper$CDOHibernateIterator.next(HibernateMoveableListWrapper.java:323)
at org.hibernate.type.CollectionType.replaceElements(CollectionType.java:496)
at org.hibernate.type.CollectionType.replace(CollectionType.java:563)
at org.hibernate.type.TypeHelper.replace(TypeHelper.java:177)
at org.hibernate.event.internal.DefaultMergeEventListener.copyValues(DefaultMergeEventListener.java:372)
at org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOMergeEventListener.copyValues(CDOMergeEventListener.java:33)
at org.hibernate.event.internal.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.java:309)
at org.hibernate.event.internal.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:151)
at org.hibernate.event.internal.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:76)
at org.hibernate.internal.SessionImpl.fireMerge(SessionImpl.java:817)
at org.hibernate.internal.SessionImpl.merge(SessionImpl.java:801)
at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStoreAccessor.doWrite(HibernateStoreAccessor.java:932)
at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.write(StoreAccessorBase.java:151)
at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:531)
at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:46)
at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
at org.eclipse.emf.cdo.internal.server.Repository.commitUnsynced(Repository.java:917)
at org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:910)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:295)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:97)
at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:109)
at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:86)
at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:92)
at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:65)
at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:65)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Scenario:
There are two cdo sessions running in two separate threads on the server. The first thread creates model objects and puts them into a java.util.Queue. The second thread polls the queue and "decorates" the objects, then saves/commits the objects.

Hi Erdal,
Are you sure that the object exists in the queue when the save happens? That the referenced object is part of the same
commit and that its id-efeature was indeed set to this string value?

It is also possible that the object is there but not yet persisted, this can be controlled with cascade settings.

gr. Martin

On 02/12/2013 12:48 PM, Erdal Karaca wrote:
> Hi all,
> I get the following exception...
>
> [ERROR] Rollback in HibernateStore: org.hibernate.ObjectNotFoundException: No row with the given identifier exists:
> [Nachricht#761e8c17-5aad-4154-96a1-55bc715999fe]
> at org.hibernate.internal.SessionFactoryImpl$1$1.handleEntityNotFound(SessionFactoryImpl.java:245)
> at org.hibernate.event.internal.DefaultLoadEventListener.returnNarrowedProxy(DefaultLoadEventListener.java:283)
> at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:249)
> at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:149)
> at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:992)
> at org.hibernate.internal.SessionImpl.access$1900(SessionImpl.java:170)
> at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2336)
> at org.hibernate.internal.SessionImpl.get(SessionImpl.java:892)
> at org.eclipse.emf.cdo.server.internal.hibernate.HibernateUtil.getCDORevision(HibernateUtil.java:465)
> at
> org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.HibernateMoveableListWrapper$CDOHibernateIterator.next(HibernateMoveableListWrapper.java:323)
>
> at org.hibernate.type.CollectionType.replaceElements(CollectionType.java:496)
> at org.hibernate.type.CollectionType.replace(CollectionType.java:563)
> at org.hibernate.type.TypeHelper.replace(TypeHelper.java:177)
> at org.hibernate.event.internal.DefaultMergeEventListener.copyValues(DefaultMergeEventListener.java:372)
> at
> org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOMergeEventListener.copyValues(CDOMergeEventListener.java:33)
> at org.hibernate.event.internal.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.java:309)
> at org.hibernate.event.internal.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:151)
> at org.hibernate.event.internal.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:76)
> at org.hibernate.internal.SessionImpl.fireMerge(SessionImpl.java:817)
> at org.hibernate.internal.SessionImpl.merge(SessionImpl.java:801)
> at org.eclipse.emf.cdo.server.internal.hibernate.HibernateStoreAccessor.doWrite(HibernateStoreAccessor.java:932)
> at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.write(StoreAccessorBase.java:151)
> at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:531)
> at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:46)
> at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
> at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
> at org.eclipse.emf.cdo.internal.server.Repository.commitUnsynced(Repository.java:917)
> at org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:910)
> at
> org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:295)
>
> at
> org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:97)
>
> at
> org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:109)
>
> at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:86)
> at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:92)
> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:328)
> at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:65)
> at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:65)
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
> at org.eclipse.net4j.signal.Signal.run(Signal.java:149)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
>
>
>
> Scenario:
> There are two cdo sessions running in two separate threads on the server. The first thread creates model objects and
> puts them into a java.util.Queue. The second thread polls the queue and "decorates" the objects, then saves/commits the
> objects.
>
>
>