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.
Build: NetBeans IDE Dev (Build 201008200001) VM: Java HotSpot(TM) Client VM, 16.3-b01, Java(TM) SE Runtime Environment, 1.6.0_20-b02 OS: Windows XP Stacktrace: java.lang.NullPointerException at org.netbeans.modules.java.api.common.project.BaseActionProvider.setupTestSingle(BaseActionProvider.java:954) at org.netbeans.modules.java.api.common.project.BaseActionProvider.getTargetNames(BaseActionProvider.java:621) at org.netbeans.modules.web.project.WebActionProvider.getTargetNames(WebActionProvider.java:370) at org.netbeans.modules.java.api.common.project.BaseActionProvider$1Action.run(BaseActionProvider.java:414) at org.netbeans.modules.java.api.common.project.BaseActionProvider.invokeAction(BaseActionProvider.java:555) at org.netbeans.modules.project.ui.actions.FileCommandAction.actionPerformed(FileCommandAction.java:108)
Created attachment 101559 [details] stacktrace
Steps to reproduce: - Create the Calculator Web Service with add method: http://netbeans.org/kb/docs/websvc/jax-ws.html - Select the web service and choose Test Web Service The exception pops up
Created attachment 101560 [details] stacktrace
Cannot see any connection to specific WS code. Reassigning to web project.
f21634669d0b
Not very good fix. Reopening and rolling back when available in jet-main. Please commit changes in the java modules only into jet-main repository to prevent merge conflicts. Thanks
*** Bug 189766 has been marked as a duplicate of this bug. ***
The problem is caused by the fact thaat "Test File" action is not the same action as "Test Web Service". The Test Web service is missing. Milan should evaluate why. The Test File action tries to find out the unit test (in test sources) and run it. Unfortunately it does not find it and it fails with exception. I will push a fix which fixes the exception but it does not solve the root problem "Where is the Test Web Service action?"
My understanding of the problem was that a user tried to execute Test File on a Web Service class which does not have unit test associated. Unit test for a web service is still just plain junit test. Milan should clarify though. > Reopening and rolling back when available in jet-main. > Please commit changes in the java modules only into jet-main repository to > prevent merge conflicts. This is first time I've heard such a request. And it does not make much sense IMO - if I'm fixing a problem which goes through several repos (java.api.common + j2ee.common module changes I used to do quite often) how would you go about that? Such change should be done in one commit. In any case I would not want to maintain locally a repo for my team, your team, core team, etc. That would be overkill. The idea was always that team repos would minimize conflicts but they can still happen. Alternative is that I'm happy to leave to fix issues in java.api.common on you. :-)
> The problem is caused by the fact thaat "Test File" action is not the same > action as "Test Web Service". The Test Web service is missing. Created the issue 189798 Test Web Service option is missed
>My understanding of the problem was that a user tried to execute Test File on a Web Service class which does not have unit test associated. Unit test for a web service is still just plain junit test. Milan should clarify though. Right, The "Test Web Service" action is available only on Web Service nodes (project->Web Services->XService). The Test File is related to regular java unit tests, the "Test Web Service" action opens the browser with WS Tester Application (running on GlassFish or WebLogic). Note, this is apparently a problem of web project. The exception is thrown when calling Test File on any java file (in web project). Unlike in J2SE project, the "Test File" action is available on all java source nodes regardless the unit test exists or not.
In the duplicate of this issue, the user mentioned that he had followed the tutorial http://netbeans.org/kb/docs/websvc/jax-ws.html. The tutorial has a step "Test Web Service" but it's not available. The only action is "Test file" which does regular JUnit testing.
Fixed in jet-main 8daa2ca4c591
Integrated into 'main-golden', will be available in build *201008250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/8daa2ca4c591 User: Tomas Zezula <tzezula@netbeans.org> Log: #189708:NullPointerException at org.netbeans.modules.java.api.common.project.BaseActionProvider.setupTestSingle