Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » DanglingReferenceException or org.eclipse.emf.cdo.util.ObjectNotFoundException
DanglingReferenceException or org.eclipse.emf.cdo.util.ObjectNotFoundException [message #757687] Mon, 21 November 2011 09:13 Go to next message
Per Sterner is currently offline Per SternerFriend
Messages: 91
Registered: October 2011
Member
I got the Message "org.eclipse.emf.cdo.util.ObjectNotFoundException: Object OID2133 not found"

I finally tracked it down. I really removed the contained object and there did still exist some references.

My question is, shouldn't I get an DanglingReferenceException at commit time?

The steps:
First I have a 'huge' instance. Then some time later I removed some contained objects in a transaction. Here I did not get any Exception.

Later on I tried to access a list which contained a reference to this Item. Here I got the the Exception "org.eclipse.emf.cdo.util.ObjectNotFoundException"

Regards,

Per
Re: DanglingReferenceException or org.eclipse.emf.cdo.util.ObjectNotFoundException [message #757726 is a reply to message #757687] Mon, 21 November 2011 11:12 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
AFAIK, if you enable referential integrity check, then you will get a dangling reference exception on commit. I.e. check if the property "ensureReferentialIntegrity" is set on your repository...

Re: DanglingReferenceException or org.eclipse.emf.cdo.util.ObjectNotFoundException [message #757983 is a reply to message #757687] Mon, 21 November 2011 09:30 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 21.11.2011 10:13, schrieb pelle7:
> I got the Message "org.eclipse.emf.cdo.util.ObjectNotFoundException: Object OID2133 not found"
>
> I finally tracked it down. I really removed the contained object and there did still exist some references.
>
> My question is, shouldn't I get an DanglingReferenceException at commit time?
That depends. Enforcing referential integrity can decrease the commit times drastically (depending on the logical model
and the chosen backend store). Nevertheless CDO 4.0 comes with:

316434: Provide an option which prevents removal of still referenced objects (referential integrity)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=316434

315407: Stale references can occur if one of two commits deletes a reference target
https://bugs.eclipse.org/bugs/show_bug.cgi?id=315407

>
> The steps:
> First I have a 'huge' instance. Then some time later I removed some contained objects in a transaction. Here I did not
> get any Exception.
>
> Later on I tried to access a list which contained a reference to this Item. Here I got the the Exception
> "org.eclipse.emf.cdo.util.ObjectNotFoundException"
There's also the option to deal with this kind of exception at "load-time":

org.eclipse.emf.cdo.view.CDOView.Options.setStaleReferencePolicy(CDOStaleReferencePolicy)

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: DanglingReferenceException or org.eclipse.emf.cdo.util.ObjectNotFoundException [message #758463 is a reply to message #757983] Wed, 23 November 2011 11:28 Go to previous message
Per Sterner is currently offline Per SternerFriend
Messages: 91
Registered: October 2011
Member
Thank you for the detailed information. It works as expected.

Regards , Per
Previous Topic:Binding Data with a textbox
Next Topic:[EMF Compare]Problem getting the text diff popup for a string EAttribute
Goto Forum:
  


Current Time: Sat Apr 20 01:30:02 GMT 2024

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

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

Back to the top