Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO/Hibernate] ObjectNotFoundException No row with the given identifier exists
[CDO/Hibernate] ObjectNotFoundException No row with the given identifier exists [message #1008412] Tue, 12 February 2013 11:48 Go to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 756
Registered: July 2009
Senior Member
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.


Re: [CDO/Hibernate] ObjectNotFoundException No row with the given identifier exists [message #1008467 is a reply to message #1008412] Tue, 12 February 2013 15:45 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5340
Registered: July 2009
Senior Member
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.
>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Previous Topic:Nested Properties in EMF
Next Topic:Ecore Change
Goto Forum:
  


Current Time: Tue Dec 23 04:39:03 GMT 2014

Powered by FUDForum. Page generated in 0.13871 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software