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 196710

Summary: NullPointerException at org.netbeans.modules.websvc.manager.ui.TestWebServiceMethodDlg.getRuntimeClassLoader
Product: webservices Reporter: brettryan <brettryan>
Component: ManagerAssignee: Denis Anisimov <ads>
Status: RESOLVED FIXED    
Severity: normal CC: brettryan
Priority: P3    
Version: 7.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 177579
Attachments: stacktrace
stacktrace
Stacktrace of web-service test

Description brettryan 2011-03-15 08:03:28 UTC
This bug was originally marked as duplicate of bug 153304, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.0 Beta 2 (Build 201102140001)
VM: Java HotSpot(TM) Client VM, 19.1-b02, Java(TM) SE Runtime Environment, 1.6.0_24-b07
OS: Windows 7

User Comments:
brettryan: Trying to test a web-service endpoint added to "Services > Web Services".




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.websvc.manager.ui.TestWebServiceMethodDlg.getRuntimeClassLoader(TestWebServiceMethodDlg.java:180)
   at org.netbeans.modules.websvc.manager.ui.TestWebServiceMethodDlg.myInitComponents(TestWebServiceMethodDlg.java:501)
   at org.netbeans.modules.websvc.manager.ui.TestWebServiceMethodDlg.<init>(TestWebServiceMethodDlg.java:127)
   at org.netbeans.modules.websvc.manager.ui.TestMethodAction.performAction(TestMethodAction.java:90)
   at org.openide.util.actions.NodeAction$DelegateAction$1.run(NodeAction.java:586)
   at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:95)
Comment 1 brettryan 2011-03-15 08:03:32 UTC
Created attachment 107005 [details]
stacktrace
Comment 2 brettryan 2011-03-15 08:10:05 UTC
Created attachment 107007 [details]
stacktrace

Trying to test webservice method.
Comment 3 Denis Anisimov 2011-03-15 08:30:50 UTC
NPE in that case is not original problem.
Please check the issue again.
The reason of the NPE should be the IOException which is consequence 
of the impossibility to copy file to the temporary file.
If you are able to reproduce this issue please press "<Previous" in the 
exception error dialog and attach the IOException to the issue if any.
Comment 4 brettryan 2011-03-15 09:31:46 UTC
Created attachment 107012 [details]
Stacktrace of web-service test

It appears that NetBeans is getting confused with a serviceName containing a path. My service is declared as

    @WebService(serviceName = "services/Items",
                name = "services/Items",
                targetNamespace = "http://rps.johnsands.com.au/")
    public class ItemsImpl implements ItemsSEI {

With a mapping defined in web.xml as

    <servlet-mapping>
        <servlet-name>ItemsWS</servlet-name>
        <url-pattern>/services/Items</url-pattern>
    </servlet-mapping>

and an endpoint mapping in sun-jaxws.xml as:

    <endpoint implementation="com.johnsands.rps.services.ItemsImpl" name="services/Items" url-pattern="/services/Items"/>

The JAR file NB is looking for does exist as:

    /Users/bryan/.netbeans/6.9/config/WebServices/Items/jaxws/services/Items.jar
Comment 5 Denis Anisimov 2011-03-15 09:34:53 UTC
Thank you very much.
This is exactly what I've asked!
Comment 6 Denis Anisimov 2011-04-27 10:59:52 UTC
changeset:   192949:e140ce59f437
Comment 7 Quality Engineering 2011-04-29 04:42:40 UTC
Integrated into 'main-golden', will be available in build *201104290000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/e140ce59f437
User: Denis Anisimov <ads@netbeans.org>
Log: Fix for BZ#196710 - NullPointerException at org.netbeans.modules.websvc.manager.ui.TestWebServiceMethodDlg.getRuntimeClassLoader