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.

Bug 75727 - Target for ws or ws client is not created, building project fails
Summary: Target for ws or ws client is not created, building project fails
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: JAX-WS (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Roderico Cruz
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2006-04-30 09:08 UTC by Martin Grebac
Modified: 2006-06-20 13:41 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Grebac 2006-04-30 09:08:43 UTC
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.
Comment 1 Milan Kuchtiak 2006-04-30 09:53:02 UTC
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.
Comment 2 Martin Adamek 2006-04-30 10:02:04 UTC
Probably duplicate of issue 73279
Comment 3 Martin Adamek 2006-04-30 12:17:52 UTC
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.
Comment 4 Roderico Cruz 2006-05-02 01:19:35 UTC
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)
Comment 5 Milan Kuchtiak 2006-05-02 09:03:51 UTC
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.
Comment 6 Milan Kuchtiak 2006-05-02 09:29:50 UTC
It is 100% reproducible when jax-ws.xml is open in editor. This mean that editor
is locking jax-ws.xml file object.
Comment 7 Lukas Jungmann 2006-05-02 09:54:18 UTC
Isn't issue #75016 similar? Or the cause at least?
Comment 9 Jaroslav Pospisil 2006-06-20 13:41:30 UTC
VERIFIED