This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This bug was reproduced on 3 machines (2 WinXP and 1 Solaris Sparc). Sometimes it's need to create several projects and bpel's in a row to reproduce this bug ... Steps to reproduce: - Create new bpel project. - Create new bpel process in project. - Open bpel and add some activity to process. - Invoke Save All action. - Information dialog with message "Cannot save newProcess" appears. - Also exception appears in IDE log (see attach).
Created attachment 35392 [details] Exception from IDE log
next scenario always reproducable for me: (WinXP) - Create new bpel project - Create new bpel process in project - add some activities to the process !!! don't save the changes - Create another new bpel project - Create new bpel process in project - add some activities to the process !!! don't save the changes result: there is two opened unsaved processes from different projects - invoke Save All action - Information dialog with message "Cannot save newProcess" appears.
I tryid to analize the stack trace and found suspecious part of code. I removed all not important lines! org.netbeans.modules.masterfs.filebasedfs.fileobjects.MutualExclusionSupport; method: addResource(...) boolean isInUse = true; for (int i = 0; i < 10 && isInUse; i++) { isInUse = unexpectedCounter != null && unexpectedCounter.size() > 0; if (isInUse) { wait(200); } } if (isInUse) { FSException.io("EXC_CannotGetExclusiveAccess", key.toString()); } So the method tries to get exclusive access to the file 10 times and does a 200ms timout ofter each attempt. It turned out that maximum delay can be 2 seconds. So it seems the exception will appear if: -- the file with the BPEL process is locked by other IO activity for more then 2 seconds. -- the CPU is occupied highly with some other task.
It is almost obvious that someone other perform lock on file object and didn't release it. The problem is in determening who previously obtianed this lock. And why it was not released.
It is noticed that problem appears due mapper presence. Issue cannot be reproduced if mapper is disabled. So problem is in the mapper.
The fix for this particular issue should be part of overall change how BPEL mapper works with BPEL OM. And fix only for this particular issue can cause side effect. Will be fixed by FCS.
Added to staged NB Enterprise Release Notes 5.5.1 Beta (http://nbstaging.czech.sun.com/community/releases/55/1/entpack_relnotes.html#87550)
Removed Beta EP551_WAIVER_APPROVED keyword - we are going forward to FCS.
Was able to reproduce it without a mapper being opened at the time of the Save action. Although, the Mapper was opened for some time before I tried to Save. Also, I used to be able to reproduce the issue 100% by following lativ's recipe, but now it's really difficult to reproduce (I've created about 30 projects by following the recipe and the bug reproduced just twice).
*** Issue 97689 has been marked as a duplicate of this issue. ***
OK, the problem is that in some places in the code there is a call to FileObject.getInputStream() and that input stream is not explicitly closed. It gets closed later as a part of garbage collecting (there is a call to close() in finalize()), but until then the file is locked for writing and thus user can not save the file.
Fixed in trunk: Checking in samples/src/org/netbeans/modules/bpel/samples/SoaSampleUtils.java; /cvs/enterprise/bpel/samples/src/org/netbeans/modules/bpel/samples/SoaSampleUtils.java,v <-- SoaSampleUtils.java new revision: 1.6; previous revision: 1.5 done Checking in project/src/org/netbeans/modules/bpel/project/BpelproProjectGenerator.java; /cvs/enterprise/bpel/project/src/org/netbeans/modules/bpel/project/BpelproProjectGenerator.java,v <-- BpelproProjectGenerator.java new revision: 1.8; previous revision: 1.7 done Checking in core/src/org/netbeans/modules/bpel/core/wizard/NewBpelFileIterator.java; /cvs/enterprise/bpel/core/src/org/netbeans/modules/bpel/core/wizard/NewBpelFileIterator.java,v <-- NewBpelFileIterator.java new revision: 1.5; previous revision: 1.4 done
Verified in build 200709021200.