Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363446

Summary: XMLResourceImpl fails to load BinaryResourceImpl output
Product: [Modeling] EMF Reporter: Csaba Koncz <csabakoncz>
Component: XML/XMIAssignee: Ed Merks <Ed.Merks>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: milesparker
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Csaba Koncz CLA 2011-11-10 05:22:30 EST
Build Identifier: EMF 2.7

Loading a resource produced by BinaryResourceImpl can not be loaded with XMLResourceImpl specifying XMLResource.OPTION_BINARY=true option. 
Actually, loading the EObjectInputStream succeeds, it is the extrinsic ID loading that fails.

Reproducible: Always
Comment 1 Ed Merks CLA 2011-11-28 03:56:58 EST
The fix is committed to CVS for 2.8.
Comment 2 Miles Parker CLA 2011-12-13 14:45:21 EST
Ed, do you have this fix for the 2.7.2 stream and if so any idea when this will be promoted? I've hit this one and I'm only seeing the 1031 build on http://download.eclipse.org/modeling/emf/emf/updates/2.7.x.
Comment 3 Ed Merks CLA 2011-12-13 14:57:20 EST
I wasn't planning to fix it for 2.7.2...  I suppose I could...
Comment 4 Miles Parker CLA 2011-12-13 14:59:52 EST
That would be hugely appreciated. :) As it is, I think 2.7.0 works but another bug in 2.7.1 prevents that from being used. At least I think this is the bug I'm running into. If there is a workaround that would work for me as well.
Comment 5 Miles Parker CLA 2011-12-14 15:48:09 EST
Do we know what version / build this was introduced in? It seemed to work correctly in 2.7.0. What plugins are implicated? I was thinking org.eclipse.emf.common but I'm at 2.7.0 there and it's broken.
Comment 6 Miles Parker CLA 2011-12-14 15:58:53 EST
OK, after writing that I figured out where the mystery was coming from. I'm not even sure it was related, it was probably just simultaneous with this fix. I'm not even using the XMLResource.OPTION_BINARY, instead I'm using my own PackageBinaryResourceImpl.

The issue was that I had added to the load options:

XMLResource.OPTION_DEFER_IDREF_RESOLUTION = True

It seems that for some reason that was breaking loading.

In any case, I don't think that I need the fix for 2.7.2 build but I can't speak for anyone else of course.
Comment 7 Ed Merks CLA 2012-01-09 04:00:13 EST
The fix is available in a build.