|Re: Saving model in a resource causes IOWrappedException [message #1183949 is a reply to message #1183402]
||Wed, 13 November 2013 05:52
| Ed Merks
Registered: July 2009
On 12/11/2013 10:07 PM, Ken Mising name wrote:
> I am running into a problem while saving an EMF model. Here is the
> exception I am getting:
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The object
> (<SNIP>)' is not contained in a resource.
> So, I have an object called WorkspaceManager that contains several
> Project objects. I have to keep the reference from WorkspaceManager to
> Project a containment reference because I'm actually using the map
> functionality in EMF and it requires the containment attribute be
> true. Now, I am trying to save just the Project object and it has no
> references or attributes that point to a WorkspaceManager object. It
> does have an EOperation that returns a WorkspaceManager object, but I
> don't think that's the problem. I'm wondering if when it is
> serializing the Project object, it is also serializing its eContainer.
If there's a container EReference and if that's not transient, it will
serialize that. So you could make that transient, but you've not
mentioned having such a reference.
> If that's the case, how do I stop that?
By making it transient. Otherwise, it sounds like a
DanglingHREFException so you can set an exception breakpoint (the little
J! icon in the Breakpoints view) and see which reference is causing the
problem. Or you can use
just ignore them.
Powered by FUDForum
. Page generated in 0.01387 seconds