Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF compare](merge)
[EMF compare] [message #664586] Mon, 11 April 2011 10:03 Go to next message
No real name is currently offline No real nameFriend
Messages: 42
Registered: December 2010
Member
HI,

Some error generated when I execute programmatically the functionality of merge.
any idea, please ?

MergeService.merge(differences, true);




Exception in thread "main" org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The object 'model.impl.FormImpl@273686 (_id: 3, _name: formulaire_add)' is not contained in a resource.
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.endSave(XMLSaveImpl.java:306)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:235)
	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:254)
	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.save(XMLResourceImpl.java:229)
	at org.eclipse.emf.compare.util.ModelUtils.serialize(ModelUtils.java:429)
	at model.test.Compare.main(Compare.java:97)


Re: [EMF compare] [message #664948 is a reply to message #664586] Tue, 12 April 2011 15:01 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
The error message is pretty clear on this : one of the object in the target model (after the merge, as it seem to happen when we try and save the merged model) is not "contained" within any of your models, yet it is "referenced" by another.

The offending object here is "Formulaire_add" of type "Form". You reference it from somewhere in the model, yet it isn't in the model tree itself (that is, "formulaire_add.eResource() == null"). EMF Cannot save such models.

You need to find where this object is referenced from, and why it isn't located in one of your models. Should it have been merged along with the other differences? Or did you create if ("FormFactory.eINSTANCE.createForm()" or something of the sort) without adding it into a proper container?

Laurent Goubet
Obeo
Previous Topic:[EMF COMPARE]
Next Topic:[Texo] [bug] Texo 0.1.0 does not respect @Temporal annotation model, sticks with DATE
Goto Forum:
  


Current Time: Thu Mar 28 18:31:40 GMT 2024

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

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

Back to the top