Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] ObjectNotFoundException
[CDO] ObjectNotFoundException [message #430798] Wed, 10 June 2009 19:14 Go to next message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
Hello.

I have a model where object A contains several objects B, and an object C that references some of
those B objects that are contained in A.
When I now delete some B objects from A (that are referenced by C), I get an
"ObjectNotFoundException: Object OID671 not found (temporary = false)" when I try to access the
reference in C.
The problem is that from there on I don't know how to solve that exception. Even calling the set
method of C throws that Exception, so it can't be corrected anymore.
Or do I miss something?

Regards,
Kai
Re: [CDO] ObjectNotFoundException [message #430812 is a reply to message #430798] Thu, 11 June 2009 07:49 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Kai,

If you get an exception, why not share the stack trace with us? :P

What you're doing sounds like one of the most basic use cases of CDO.
Hence I'd be surprised if you uncovered a severe problem in this area
that nobody else complained about, yet. But it's still possible! I
suggest you file a bugzilla and give all the information that can help
us track it down (incl. the used models if they're not confidential).

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Kai Schlamp schrieb:
> Hello.
>
> I have a model where object A contains several objects B, and an
> object C that references some of those B objects that are contained in A.
> When I now delete some B objects from A (that are referenced by C), I
> get an "ObjectNotFoundException: Object OID671 not found (temporary =
> false)" when I try to access the reference in C.
> The problem is that from there on I don't know how to solve that
> exception. Even calling the set method of C throws that Exception, so
> it can't be corrected anymore.
> Or do I miss something?
>
> Regards,
> Kai


Re: [CDO] ObjectNotFoundException [message #430819 is a reply to message #430812] Thu, 11 June 2009 11:44 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
I was able to reproduce it:
This is working well:

container.setElement(contained);
reference.setElement(contained);
res.getContents().add(container);
res.getContents().add(reference);
tx.commit();
container.setElement(null);
reference.setElement(null);

But the following isn't working well :


container.setElement(contained);
reference.setElement(contained);
res.getContents().add(container);
res.getContents().add(reference);
tx.commit();
container.setElement(null);
tx.commit();
reference.setElement(null); << Exception



org.eclipse.emf.cdo.util.ObjectNotFoundException: Object OID5 not found
(temporary = false)
at org.eclipse.emf.internal.cdo.util.FSMUtil.validate(FSMUtil.j ava:250)
at
org.eclipse.emf.internal.cdo.view.CDOViewImpl.createObject(C DOViewImpl.java:824)
at
org.eclipse.emf.internal.cdo.view.CDOViewImpl.getObject(CDOV iewImpl.java:722)
at
org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl. getObject(CDOTransactionImpl.java:564)
at
org.eclipse.emf.internal.cdo.view.CDOViewImpl.convertIDToObj ect(CDOViewImpl.java:1016)
at org.eclipse.emf.internal.cdo.CDOStore.convertToEMF(CDOStore. java:384)
at org.eclipse.emf.internal.cdo.CDOStore.get(CDOStore.java:177)
at
org.eclipse.emf.ecore.impl.EStoreEObjectImpl.dynamicGet(ESto reEObjectImpl.java:646)
at
org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSe ttingDelegateSingleEObject.dynamicSet(EStructuralFeatureImpl .java:2369)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(Basi cEObjectImpl.java:1129)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1103)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1073)
at
org.eclipse.emf.cdo.tests.model4.impl.GenRefSingleNonContain edImpl.setElement(GenRefSingleNonContainedImpl.java:84)
at


What is the best way to solve that ?

Should we come up with an new API that the user could access directly ?
Like the following
CDOUtil.eUnset(EObject, EStructuralFeature);

Or

return a proxy that will fail when it will resolve ....???

Others suggestions ?
Re: [CDO] ObjectNotFoundException [message #430821 is a reply to message #430819] Thu, 11 June 2009 12:15 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Simon,

Can you transfer this discussion to a new Bugzilla? Thx ;-)

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Simon Mc Duff schrieb:
> I was able to reproduce it:
> This is working well:
>
> container.setElement(contained);
> reference.setElement(contained);
> res.getContents().add(container);
> res.getContents().add(reference);
> tx.commit();
> container.setElement(null);
> reference.setElement(null);
>
> But the following isn't working well :
>
>
> container.setElement(contained);
> reference.setElement(contained);
> res.getContents().add(container);
> res.getContents().add(reference);
> tx.commit();
> container.setElement(null);
> tx.commit();
> reference.setElement(null); << Exception
>
>
>
> org.eclipse.emf.cdo.util.ObjectNotFoundException: Object OID5 not
> found (temporary = false)
> at
> org.eclipse.emf.internal.cdo.util.FSMUtil.validate(FSMUtil.j ava:250)
> at
> org.eclipse.emf.internal.cdo.view.CDOViewImpl.createObject(C DOViewImpl.java:824)
>
> at
> org.eclipse.emf.internal.cdo.view.CDOViewImpl.getObject(CDOV iewImpl.java:722)
>
> at
> org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl. getObject(CDOTransactionImpl.java:564)
>
> at
> org.eclipse.emf.internal.cdo.view.CDOViewImpl.convertIDToObj ect(CDOViewImpl.java:1016)
>
> at
> org.eclipse.emf.internal.cdo.CDOStore.convertToEMF(CDOStore. java:384)
> at org.eclipse.emf.internal.cdo.CDOStore.get(CDOStore.java:177)
> at
> org.eclipse.emf.ecore.impl.EStoreEObjectImpl.dynamicGet(ESto reEObjectImpl.java:646)
>
> at
> org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSe ttingDelegateSingleEObject.dynamicSet(EStructuralFeatureImpl .java:2369)
>
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(Basi cEObjectImpl.java:1129)
>
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1103)
>
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1073)
>
> at
> org.eclipse.emf.cdo.tests.model4.impl.GenRefSingleNonContain edImpl.setElement(GenRefSingleNonContainedImpl.java:84)
>
> at
>
> What is the best way to solve that ?
> Should we come up with an new API that the user could access directly ?
> Like the following
> CDOUtil.eUnset(EObject, EStructuralFeature);
>
> Or
> return a proxy that will fail when it will resolve ....???
>
> Others suggestions ?
>
>
>
>
>


Re: [CDO] ObjectNotFoundException [message #430839 is a reply to message #430821] Thu, 11 June 2009 17:36 Go to previous message
Kai Schlamp is currently offline Kai SchlampFriend
Messages: 344
Registered: July 2009
Senior Member
Thanks Simon,

that's exaclty what I meant.

I created a bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=279982

Eike Stepper wrote:
> Simon,
>
> Can you transfer this discussion to a new Bugzilla? Thx ;-)
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
> Simon Mc Duff schrieb:
>> I was able to reproduce it:
>> This is working well:
>>
>> container.setElement(contained);
>> reference.setElement(contained);
>> res.getContents().add(container);
>> res.getContents().add(reference);
>> tx.commit();
>> container.setElement(null);
>> reference.setElement(null);
>>
>> But the following isn't working well :
>>
>>
>> container.setElement(contained);
>> reference.setElement(contained);
>> res.getContents().add(container);
>> res.getContents().add(reference);
>> tx.commit();
>> container.setElement(null);
>> tx.commit();
>> reference.setElement(null); << Exception
>>
>>
>>
>> org.eclipse.emf.cdo.util.ObjectNotFoundException: Object OID5 not
>> found (temporary = false)
>> at
>> org.eclipse.emf.internal.cdo.util.FSMUtil.validate(FSMUtil.j ava:250)
>> at
>> org.eclipse.emf.internal.cdo.view.CDOViewImpl.createObject(C DOViewImpl.java:824)
>>
>> at
>> org.eclipse.emf.internal.cdo.view.CDOViewImpl.getObject(CDOV iewImpl.java:722)
>>
>> at
>> org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl. getObject(CDOTransactionImpl.java:564)
>>
>> at
>> org.eclipse.emf.internal.cdo.view.CDOViewImpl.convertIDToObj ect(CDOViewImpl.java:1016)
>>
>> at
>> org.eclipse.emf.internal.cdo.CDOStore.convertToEMF(CDOStore. java:384)
>> at org.eclipse.emf.internal.cdo.CDOStore.get(CDOStore.java:177)
>> at
>> org.eclipse.emf.ecore.impl.EStoreEObjectImpl.dynamicGet(ESto reEObjectImpl.java:646)
>>
>> at
>> org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSe ttingDelegateSingleEObject.dynamicSet(EStructuralFeatureImpl .java:2369)
>>
>> at
>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(Basi cEObjectImpl.java:1129)
>>
>> at
>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1103)
>>
>> at
>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1073)
>>
>> at
>> org.eclipse.emf.cdo.tests.model4.impl.GenRefSingleNonContain edImpl.setElement(GenRefSingleNonContainedImpl.java:84)
>>
>> at
>>
>> What is the best way to solve that ?
>> Should we come up with an new API that the user could access directly ?
>> Like the following
>> CDOUtil.eUnset(EObject, EStructuralFeature);
>>
>> Or
>> return a proxy that will fail when it will resolve ....???
>>
>> Others suggestions ?
>>
>>
>>
>>
>>
Previous Topic:net4j ethernet
Next Topic:[TENEO] Problem with GMF BasicDecorationNodeImpl
Goto Forum:
  


Current Time: Thu Apr 25 14:31:29 GMT 2024

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

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

Back to the top