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.
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... http://wikihome.sfbay.sun.com/fast/attach/Nokia_080310%2Ftmwdemo-moms-compapp.zip 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\CompositeApp1.casa at org.netbeans.modules.masterfs.filebasedfs.fileobjects.LockForFile.registerLock(LockForFile.java:108) at org.netbeans.modules.masterfs.filebasedfs.fileobjects.LockForFile.tryLock(LockForFile.java:97) at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.lock(FileObj.java:277) at org.netbeans.modules.compapp.projects.jbi.descriptor.XmlUtil.writeToFileObject(XmlUtil.java:133) at org.netbeans.modules.compapp.projects.jbi.descriptor.XmlUtil.writeToFile(XmlUtil.java:99) at org.netbeans.modules.compapp.projects.jbi.anttasks.CasaBuilder.createCasaDocument(CasaBuilder.java:234) at org.netbeans.modules.compapp.projects.jbi.anttasks.BuildServiceAssembly.execute(BuildServiceAssembly.java:338) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor236.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) at org.apache.tools.ant.Project.executeTarget(Project.java:1298) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1181) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151) C:\tmwdemo\BP2\CompositeApp1\src\conf\CompositeApp1.casa Filtering Java EE Endpoints... Deleting: C:\tmwdemo\BP2\CompositeApp1\build\BCDeployment.jar Building jar: C:\tmwdemo\BP2\CompositeApp1\dist\CompositeApp1.zip BUILD SUCCESSFUL (total time: 4 seconds)
*** Issue 136191 has been marked as a duplicate of this issue. ***
Louis, 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 Thanks, -- Tientien Li
Thanks for the update.
Fixed in trunk. Changeset: http://hg.netbeans.org/main?cmd=changeset;node=485939a82f62
Integrated into 'main-golden', available in NB_Trunk_Production #239 build Changeset: http://hg.netbeans.org/main/rev/485939a82f62 User: Jun Qian <jqian@netbeans.org> Log: #136190 Fix file lock issue when building compapp project immediately after dropping multiple SU projects into CASA.
I think this should be included in 6.1 patches.
According to Jun, the simplest test case was simply to add two SUs and then click Build Project to reproduce the race condition. 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.
The fix has been ported into the release61_fixes repository. http://hg.netbeans.org/release61_fixes/rev/29c96a215209