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.
Using latest beta cont. build, fresh userdir, GF b45. Create a new web project. Create a new WS from WSDL or WS Client. Something happens, but the jaxws.xml file is empty, and the target is not present in build-impl.xml, thus at the end of invocation the target is called, but since it doesn't exist, building fails. Happens more often for tomcat (in 50-60% of cases), but for AS as well even though not that often. Seems to be some timing problem.
I did some changes in ProjectJAXWSSupport/ProjectJAXWSClientSupport At least, when service/client is not added to jax-ws.xml no targets will be called. It need to be investigate why elements are not added to jax-ws.xml.
Probably duplicate of issue 73279
Issue 73279 is fixed in release55 branch. I think it will fix also this one. Please reevaluate with that fix. I tried 2 WS from WSDL (random WSDLs from inet) but I got NPEs on different place, so I am not able to verify.
The problem still occurs randomly, giving a "Cannot get exclusive access to jax-ws.xml" message when writing to this file. Looks like jax-ws.xml is being held and not being released on time. The call to FileObject.getOutputStream() fails and writing to this file fails. As such, no wsimport build target is generated. Here is the trace: org.netbeans.modules.masterfs.filebasedfs.utils.FSException: Cannot get exclusive access to C:\bug_projects\WebApplication3\nbproject\jax-ws.xml. at org.netbeans.modules.masterfs.filebasedfs.utils.FSException.io(FSException.java:99) at org.netbeans.modules.masterfs.filebasedfs.fileobjects.MutualExclusionSupport.addResource(MutualExclusionSupport.java:71) at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.getOutputStream(FileObj.java:49) at org.netbeans.modules.masterfs.MasterFileObject.getOutputStream(MasterFileObject.java:148) [catch] at org.netbeans.modules.websvc.spi.jaxws.client.ProjectJAXWSClientSupport.writeJaxWsModel(ProjectJAXWSClientSupport.java:171) at org.netbeans.modules.websvc.spi.jaxws.client.ProjectJAXWSClientSupport.addServiceClient(ProjectJAXWSClientSupport.java:104) at org.netbeans.modules.websvc.api.jaxws.client.JAXWSClientSupport.addServiceClient(JAXWSClientSupport.java:105) at org.netbeans.modules.websvc.core.client.wizard.WebServiceClientCreator.generate15Client(WebServiceClientCreator.java:148) at org.netbeans.modules.websvc.core.client.wizard.WebServiceClientCreator.access$000(WebServiceClientCreator.java:62) at org.netbeans.modules.websvc.core.client.wizard.WebServiceClientCreator$1.run(WebServiceClientCreator.java:105) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:493) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926)
The problem is likely caused by the concurrent access to jax-ws.xml file object. Seams that multiple subjects are trying to change jax-ws.xml at one time. E.g. annotation listener and wizard. I'll also look at that. NNlistener shouldn't fire "add service" events when WS from WSDL or Client is created. There was a bug in NN Listener related with this : issue 75328.
It is 100% reproducible when jax-ws.xml is open in editor. This mean that editor is locking jax-ws.xml file object.
Isn't issue #75016 similar? Or the cause at least?
Fixed. The input stream for jax-ws.xml wasn't closed correctly. Diff: 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
VERIFIED