|"Object not contained in a resource" Exception while saving [message #589375]
||Fri, 16 May 2008 14:38
Originally posted by: quentin.deme.st.com|
I've made an EPF Composer plug-in allowing to instanciate a project from a
model defined with EPF.
In the plug-in, the user can make changes about things existing in the
The instanciation needs to load a resource, and remove some tasks and
milestones from it. I use TaskDescriptorImpl.delete(), and there's no
problem, until I use resource.save(map).
resource.save(map) gives the following exception :
Exception save() :
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The object
'org.eclipse.epf.uma.impl.MilestoneImpl@174aee5 (name: ) (guid: ,
briefDescription: , suppressed: false, orderingGuide: ) (presentationName:
, shapeicon: null, nodeicon: null) (prefix: , isPlanned: true,
hasMultipleOccurrences: false, isOptional: false) (isRepeatable: false,
isOngoing: false, isEventDriven: false)' is not contained in a resource.
In this case, it's the removal of a milestone that provokes this error.
I've searched the Internet, and I found that this exception means that an
object A contains a reference to the removed object B.
I tried other functions like
setSuppressed(true), in addition to delete().
I also tried to cast into TaskDescriptor and do setSuppressed(true) and
delete()... It doesn't solve the problem.
This is the very last problem that occurs in my project, and I really need
your help. The modifications that the user makes are not correctly done,
and some modifications are not performed, because of this exception.
Thanks in advance,
Powered by FUDForum
. Page generated in 0.07008 seconds