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 112795 - Cannot invoke Add Operation action
Summary: Cannot invoke Add Operation action
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: JAX-WS (show other bugs)
Version: 6.x
Hardware: All Linux
: P2 blocker (vote)
Assignee: bhate
URL:
Keywords: RANDOM
: 112794 116255 119131 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-08-14 19:47 UTC by Lukas Jungmann
Modified: 2008-01-30 15:17 UTC (History)
0 users

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 Lukas Jungmann 2007-08-14 19:47:08 UTC
hudson #2466, jdk6u2

-create new ejbmodule (1.4)
-create new ws in it
-try to invoke "Add Operation" action

=> java.lang.NullPointerException
	at org.netbeans.modules.websvc.core.jaxws.actions.JaxWsAddOperation.getService(JaxWsAddOperation.java:87)
	at org.netbeans.modules.websvc.core.jaxws.actions.JaxWsAddOperation.<init>(JaxWsAddOperation.java:55)
	at
org.netbeans.modules.websvc.core.jaxws.actions.JaxWsAddOperationProvider.getAddOperationCookie(JaxWsAddOperationProvider.java:32)
	at org.netbeans.modules.websvc.core.WebServiceActionProvider.getAddOperationAction(WebServiceActionProvider.java:40)
	at org.netbeans.modules.websvc.core.webservices.action.WebServiceActionGroup.hasWebService(WebServiceActionGroup.java:86)
	at
org.netbeans.modules.websvc.core.webservices.action.WebServiceActionGroup.getPopupPresenter(WebServiceActionGroup.java:51)
	at org.netbeans.modules.editor.NbEditorKit$NbBuildPopupMenuAction.createLocalizedMenuItem(NbEditorKit.java:337)
...
Comment 1 bhate 2007-08-18 00:11:43 UTC
The reason is that JAXWSSupport is in the web project lookpup for j2ee 1.4 web project.
investigating.
Comment 2 Roderico Cruz 2007-08-18 20:05:22 UTC
I cannot reproduce with current development build. Kindly try this again and reopen if necessary. Meanwhile, closing as
WORKSFORME.
Comment 3 Lukas Jungmann 2007-08-20 22:44:12 UTC
you're right, this somehow got fixed.
Comment 4 Lukas Jungmann 2007-10-16 22:25:44 UTC
happens again in beta2 build with JAXRPC plugin...
Comment 5 Lukas Jungmann 2007-10-16 22:26:01 UTC
*** Issue 119131 has been marked as a duplicate of this issue. ***
Comment 6 Roderico Cruz 2007-10-17 03:37:42 UTC
Ajit kindly look at this.
Comment 7 bhate 2007-10-18 18:16:30 UTC
its really a jaxws issue.
the jax-ws.xml has empty service entry which causes this.
Comment 8 Roderico Cruz 2007-10-19 05:01:21 UTC
I can reproduce this 100% with the following:
1. Create J2EE4 web project.
2. Create web service from wsdl. Note that a spurious web service
reference folder is created in the project.
3. Restart the IDE.
4. Create a web service (from java) in the project. 
At this point, the jax-ws.xml file has been created and two
webservices root folder appear on the explorer.

It looks like creating a ws from wsdl in the J2EE4 project somehow
gives the project a "JAXWS capability" (not sure what this is yet).
When the IDE is restarted and the project is reopened, it can locate
a JAXWSSupport in its lookup and thus a listener for creating a 
jaxws.xml file is attached to the project. When a new web service
is added to the project, the spurious jaxws.xml file is created.
Comment 9 bhate 2007-10-19 18:34:51 UTC
*** Issue 112794 has been marked as a duplicate of this issue. ***
Comment 10 Lukas Jungmann 2007-10-25 23:33:13 UTC
*** Issue 116255 has been marked as a duplicate of this issue. ***
Comment 11 Roderico Cruz 2007-10-26 06:26:12 UTC
When a web project that has existing jaxrpc web services is opened,
WebProject.getAPIJAXWSSupport() returns a non-null value (because the 
JAXWSSupport instance is created in the project regardless of its
EE level.) Because of this, a jaxws listener is appended to the project
which creates the spurious jax-ws.xml file.
Comment 12 Roderico Cruz 2007-10-26 06:30:01 UTC
The jaxws listener is attached to the web project in 
org.netbeans.modules.websvc.core.jaxws.projects.WebWSSupportLookupProvider's
ProjectOpenedHook object.
Comment 13 bhate 2007-10-26 19:19:20 UTC
I have added check in the lookupprovider to add metadatamodel listener to only javaee5 web/ejb projects.
Now new j2ee 1.4 web and ejb projects should not have this issue.
Comment 14 Jaroslav Pospisil 2008-01-30 15:17:06 UTC
v.