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 don't have exact steps to reproduce, but usually happens when creating new webservice (if someone is behind me)...
Created attachment 29843 [details] thrown exception
I have tried to fix it. Since it is not easy to reproduce I cannot be sure that the fix will really help, so if you'll see it again feel free to reopen. Checking in JAXWSNNListener.java; /cvs/websvc/jaxwsmodel/src/org/netbeans/modules/websvc/jaxwsmodel/project/metadata/Attic/JAXWSNNListener.java,v <-- JAXWSNNListener.java new revision: 1.1.2.7; previous revision: 1.1.2.6 done
I saw it again, now while deleting webproject with ws in "Favorites" tab. IDE was started w/ clean userdir and deleted project wasn't opened in the IDE.
We agreed with Jungi, that if the issue happens only in such situation, it is not P2 anymore => downgrading. If anyone will see it in the original scenario, please upgrade it back to P2 + attach the exception stacktrace if it is different than the original one.
just correcting priority...
Now it's 100% reproducible in NB55Beta 200605020200. Just create web module on bundled tomcat, web service in it and deploy it.Create another web module and there web service client.Choose previously deployed service and enter package name. Client is correctly generated,but "Cannot get exclusive access to C:\Documents and Settings\jp154641\WebApplication6\nbproject\jax-ws.xml" message is always thrown. Also in Output window "WebApplication6-impl(wsimport-client-clear-MyWS,wsimport-client-MyWS)" is message Target `wsimport-client-clean-MyWS' does not exist in this project. BUILD FAILED (total time: 0 seconds)
The exception describet here is the same as exception in 75727. The problem was that jax-ws.xml input stream was not closed in GeneratedFilesHelper. This is the fix: http://websvc.netbeans.org/source/browse/websvc/jaxwsmodel/src/org/netbeans/modules/websvc/api/jaxws/project/GeneratedFilesHelper.java?r1=1.1.2.4.2.1&r2=1.1.2.4.2.2
Same issue (exclusive access) is now with webservices.xml
mustang b84, nb5, as8.2 bundle on Ubuntu Linux Create web app, add web service, go to add operation in editor, and get RTE "Cannot get exclusive access to {mumble}/WebApplication11/web/WEB-INF/webservices.xml" This problem does not appear with jdk5_06
Created attachment 30594 [details] log from above problem with b84
Note also reported as http://www.netbeans.org/issues/show_bug.cgi?id=73503 This problem is totally reproducible for me with the steps provided.
*** Issue 73503 has been marked as a duplicate of this issue. ***
I just receieved this exception as well. Running latest dev build of nb55 on Solaris 10, JDK 1.6, b90. J2EE 1.4 web application against Glassfish ur1 b03. "Cannot get exclusive access to /space/tmp/WSWeb/web/WEB-INF/webservices.xml"
I should add - I was attempting to create a web service in a newly created web application. My webservices.xml exists but is blank. Might be a synchronization problem with another thread attempting to access this file at the same time. I looked at the code in WebServiceGenerator.addWebServiceEntry and it uses FileUtil.copyFile() to create the initial webservices.xml file. copyFile() does not use AtomicAction which is a real problem for creating XML files because the create event is sent before the XML root nodes and/or DOCTYPE are written to the file allowing correct identification by the loader. It also wouldn't surprise me if the source of this exception is a conflict with the XML data loader reading the file while trying to identify it.
Martin or Rico or whomever wants to review this, try the attached patch that uses an atomic action to create the initial version of webservices.xml.
Created attachment 32110 [details] patch diff.
The patch looks fine. Nevertheless, this is another problem as the original one, isn't it ?
Thanks for the review. I think that patch could address this issue, or one possible cause at least. The thread that runs the dataloaders will grab a file as soon as the event is sent that it was created on disk and it has to open that file and sniff for the XML signature and what type of XML file it is. I suspect that if the thread that is writing webservices.xml (without the benefit of atomic action) does not manage to open the file it just created before the dataloader does (rare, but possible), then you would get the "Cannot get exclusive access" exception because the file is already open for read by another thread.
I applied the patch. Also the modifications of jax-ws.xml were included to FileSystem.AtomicAction. Diffs: http://websvc.netbeans.org/source/browse/websvc/dev/src/org/netbeans/modules/websvc/dev/wizard/WebServiceGenerator.java?r1=1.21.4.7.2.5&r2=1.21.4.7.2.6 http://websvc.netbeans.org/source/browse/websvc/jaxwsapi/src/org/netbeans/modules/websvc/jaxws/spi/ProjectJAXWSSupport.java?r1=1.1.2.21&r2=1.1.2.23 http://websvc.netbeans.org/source/browse/websvc/clientapi/src/org/netbeans/modules/websvc/spi/jaxws/client/ProjectJAXWSClientSupport.java?r1=1.1.2.18&r2=1.1.2.20
Haven't saw this for a long time, so marking as verified.