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

Bug 325245

Summary: XMI serialization issue when using file buffer / flush threshold save options targeting some CVS connected folder
Product: [Modeling] EMF Reporter: Fabien Giquel <fabien.giquel>
Component: XML/XMIAssignee: Ed Merks <Ed.Merks>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 2.6.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 323247    
Attachments:
Description Flags
Code sample related to the Exception
none
Stack Trace none

Description Fabien Giquel CLA 2010-09-14 09:04:18 EDT
Hi,

we encounter some misc issue when using XMI serialization for one big model with options :

   options.put(XMLResource.OPTION_FLUSH_THRESHOLD, 10000);
   options.put(XMLResource.OPTION_USE_FILE_BUFFER, true);

We encounter some FileNotFoundException when writing the XMI file into a Java project connected to CVS. If we disconnect the project from CVS, everything is alright.

To get the error, I attached the source for one project, testXMISerialize, which implements a very simple XMI serialization :
- import the project in a workspace
- launch a second eclipse instance from this one
- checkout a project from a CVS repository (whatever it is)
- on the project, right click -> "new submenu" -> "new action"

The action tries to write a big model in "TestSerializationEMF.xmi"
You should obtain in error log : "Could not write file:
D:\XXX\TestSerializationEMF.xmi.".
If a TestSerializationEMF.xmi appears and a window "serialization ok", then
delete the file and try again.


Not sure but it is as if some CVS workspace listener causes some synchronization interruption between the first .xmi part serialization and the following.

Thanks in advance for your help.
Comment 1 Fabien Giquel CLA 2010-09-14 09:05:01 EDT
Created attachment 178823 [details]
Code sample related to the Exception
Comment 2 Fabien Giquel CLA 2010-09-14 09:05:37 EDT
Created attachment 178824 [details]
Stack Trace
Comment 3 Ed Merks CLA 2010-09-16 17:59:48 EDT
I can't reproduce this.  :-(

Given that you can, it will be useful to set breakpoints to see if the file really doesn't exist at the point the exception is thrown.  If it doesn't exist, I wonder who's deleting it?