|
Re: [CDO] ObjectNotFoundException [message #430812 is a reply to message #430798] |
Thu, 11 June 2009 07:49 |
|
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
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Re: [CDO] ObjectNotFoundException [message #430821 is a reply to message #430819] |
Thu, 11 June 2009 12:15 |
|
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 ?
>
>
>
>
>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Powered by
FUDForum. Page generated in 0.03321 seconds