Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 136190 - File locking exception when trying to build comp app
File locking exception when trying to build comp app
Product: soa
Classification: Unclassified
Component: Composite Application
All Windows Vista
: P1 (vote)
: 6.x
Assigned To: Jun Qian
: 136191 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2008-05-30 18:16 UTC by lpolycarpou
Modified: 2008-07-10 17:40 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description lpolycarpou 2008-05-30 18:16:26 UTC
I created a new comp app and added a number of BPEL, XSLT and Java EE modules and did a build.  Thereafter, I added
another SQL module and immediately hit build.  From the output window, the build was apparently successful (BUILD
SUCCESSFUL message) but the provider endpoint for the SQL module was not generated wholly and going back over the build
output, we see a file lock exception...  This is trivial to repro using the projects located on SWAN here... 

Validating CompApp project...
Resolving connections...
WARNING: PORT w/o address: {http://com.sun.jbi/sqlse/sqlseengine}sqlMobilitySystemNotifier_sqlsePortType
WARNING: PORT w/o address: {http://com.sun.jbi/sqlse/sqlseengine}sqlUpdateWO_sqlsePortType
WARNING: PORT w/o address: {http://com.sun.jbi/sqlse/sqlseengine}sqlUpdateTT_sqlsePortType
Writing connections out to connections.xml...
Generating Service Assembly jbi.xml...
Merging component projects' catalogs...
Generating Binding Component Service Units...
 creating sun-http-binding.jar
Creating/Updating CASA...
org.openide.filesystems.FileAlreadyLockedException: C:\tmwdemo\BP2\CompositeApp1\src\conf\
       at org.netbeans.modules.masterfs.filebasedfs.fileobjects.LockForFile.registerLock(
       at org.netbeans.modules.masterfs.filebasedfs.fileobjects.LockForFile.tryLock(
       at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.lock(
       at org.netbeans.modules.compapp.projects.jbi.descriptor.XmlUtil.writeToFileObject(
       at org.netbeans.modules.compapp.projects.jbi.descriptor.XmlUtil.writeToFile(
       at org.netbeans.modules.compapp.projects.jbi.anttasks.CasaBuilder.createCasaDocument(
       at org.netbeans.modules.compapp.projects.jbi.anttasks.BuildServiceAssembly.execute(
       at sun.reflect.GeneratedMethodAccessor236.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(
       at java.lang.reflect.Method.invoke(
Filtering Java EE Endpoints...
Deleting: C:\tmwdemo\BP2\CompositeApp1\build\BCDeployment.jar
Building jar: C:\tmwdemo\BP2\CompositeApp1\dist\
BUILD SUCCESSFUL (total time: 4 seconds)
Comment 1 Tientien Li 2008-05-30 18:36:48 UTC
*** Issue 136191 has been marked as a duplicate of this issue. ***
Comment 2 Tientien Li 2008-06-02 20:47:08 UTC

After some testing of the problem this morning, I think we isolated its cause. There is a bug in CompApp that 
triggered a race condition between NetBeans XML model updating CASA and ant tasks modifying CASA when multiple new 
projects are added in certain combination of projects like this one. We will need to develop a more general design to 
avoid this type of problems.

Before the fix for this problem is implemented, one can work around this problem by either:

1) doing a save of CompApp changes in CASA before build, or
2) build the project again if the first build failed to update SU in CASA


Tientien Li
Comment 3 lpolycarpou 2008-06-02 21:04:24 UTC
Thanks for the update.
Comment 4 Jun Qian 2008-06-05 01:41:15 UTC
Fixed in trunk. Changeset:;node=485939a82f62

Comment 5 Quality Engineering 2008-06-05 15:50:58 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #239 build
User: Jun Qian <>
Log: #136190 Fix file lock issue when building compapp project immediately after dropping multiple SU projects into CASA.
Comment 6 Jun Qian 2008-06-10 23:34:05 UTC
I think this should be included in 6.1 patches.
Comment 7 jlautz 2008-06-13 03:06:24 UTC
According to Jun, the simplest test case was simply to add two SUs and then click Build Project to reproduce the race

I retested this test case using

Product Version: NetBeans IDE Dev (Build 200806111204)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
System: SunOS version 5.10 running on x86; ISO646-US; en (nb)
Userdir: /Users/lautz/.netbeans/dev

I can no longer reproduce the test case.
Comment 8 pslechta 2008-06-13 10:37:52 UTC
The fix has been ported into the release61_fixes repository.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo