| Summary: | [Legacy] ObjectNotFoundException in LegacyMode | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Stefan Winkler <stefan> | ||||
| Component: | cdo.legacy | Assignee: | Christian Damus <give.a.damus> | ||||
| Status: | NEW --- | QA Contact: | Eike Stepper <stepper> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | stepper, vincent.hemery | ||||
| Version: | 4.13 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Stefan Winkler
Created attachment 188345 [details]
testcase
Testcase which leads to
org.eclipse.emf.cdo.util.ObjectNotFoundException: Object OID2 not found in branch 2 at *
at org.eclipse.emf.internal.cdo.view.AbstractCDOView.createObject(AbstractCDOView.java:752)
at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:668)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.getObject(CDOTransactionImpl.java:992)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.getObject(CDOTransactionImpl.java:1)
at org.eclipse.emf.internal.cdo.object.CDOLegacyWrapper.getEObjectFromPotentialID(CDOLegacyWrapper.java:706)
at org.eclipse.emf.internal.cdo.object.CDOLegacyWrapper.revisionToInstanceResource(CDOLegacyWrapper.java:446)
at org.eclipse.emf.internal.cdo.object.CDOLegacyWrapper.revisionToInstance(CDOLegacyWrapper.java:405)
at org.eclipse.emf.internal.cdo.object.CDOLegacyWrapper.cdoInternalPostLoad(CDOLegacyWrapper.java:281)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.applyChangeSetData(CDOTransactionImpl.java:499)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.merge(CDOTransactionImpl.java:466)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.merge(CDOTransactionImpl.java:404)
at org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_336382_Test.testPromoteToBranch(Bugzilla_3xxxxx_Test.java:54)
*** Bug 338506 has been marked as a duplicate of this bug. *** Disabling Bugzilla_336382_Test for now... Committed revision 7423: - trunk/plugins/org.eclipse.emf.cdo.tests After the EclipseCon I'll have a closer look at this one ;) I think I have encountered this bug or a very similar one in a different context (using the CDO framework with H2, while developping an other application). As I work in a different context and with not up to date sources, I can not guarantee you this will work, but I think I have found how to fix it : At http://git.eclipse.org/c/cdo/cdo.git/tree/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyWrapper.java#n555 I've changed the if condition after the comment "If you have a containment reference but the container is not set ..." : Instead of if (object != instance.eContainer()) I think if (object != instance.eContainer() && !object.equals(instance.eGet(feature))) should work. The reason is that sometimes, the framework just re-set the same value (don't know why exactly, maybe there should be a check for this at a higher level). When doing so, the "eInverseAdd" method does not work as expected, but removes the already set value. Hope this will help. Moving all open bug reports to 4.1 because the release is very near and it's hghly unlikely that there will be spare time to address 4.0 problems. Please make sure that your patches can be applied against the master branch and that your problem is not already fixed there!!! Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master. Hi Christian, I assign this legacy mode zilla to you, just in case you're ineterested. Don't feel obliged ;-) We'll try to address open problems in 4.3 (master) first and then port fixes back to 4.2. Moving all open bugzillas to 4.5. Moving all unaddressed bugzillas to 4.6. Moving all open bugs to 4.7 Moving all unresolved issues to version 4.8- Moving all unresolved issues to version 4.9 Moving to 4.13. |