Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » EPF » "Object not contained in a resource" Exception while saving
"Object not contained in a resource" Exception while saving [message #589375] Fri, 16 May 2008 14:38
Eclipse UserFriend
Originally posted by: quentin.deme.st.com

Hello,

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
specified model.

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
TaskDescriptorImpl.removeFromAllOppositeFeatures(), or
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,

Quentin Demé
Previous Topic:Export to PDF
Next Topic:"Object not contained in a resource" Exception while saving
Goto Forum:
  


Current Time: Fri May 03 23:34:10 GMT 2024

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

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

Back to the top