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 196984

Summary: NullPointerException at org.netbeans.modules.maven.jaxws.WSUtils.addServlet
Product: webservices Reporter: airmax9999
Component: JAX-WSAssignee: Denis Anisimov <ads>
Status: RESOLVED INCOMPLETE    
Severity: normal CC: exceptions_reporter
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 177809
Attachments: stacktrace

Description airmax9999 2011-03-22 20:36:03 UTC
Build: NetBeans IDE 6.9.1 (Build 201011082200)
VM: Java HotSpot(TM) Client VM, 17.0-b17, Java(TM) SE Runtime Environment, 1.6.0_21-b07
OS: Windows XP

Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.maven.jaxws.WSUtils.addServlet(WSUtils.java:740)
   at org.netbeans.modules.maven.jaxws.WSUtils.addServicesToDD(WSUtils.java:724)
   at org.netbeans.modules.maven.jaxws.WSUtils.checkNonJSR109Entries(WSUtils.java:920)
   at org.netbeans.modules.maven.jaxws.MavenJaxWsSupportProvider.reactOnPomChanges(MavenJaxWsSupportProvider.java:176)
   at org.netbeans.modules.maven.jaxws.MavenJaxWsSupportProvider.access$000(MavenJaxWsSupportProvider.java:71)
   at org.netbeans.modules.maven.jaxws.MavenJaxWsSupportProvider$1.run(MavenJaxWsSupportProvider.java:79)
Comment 1 airmax9999 2011-03-22 20:36:07 UTC
Created attachment 107199 [details]
stacktrace
Comment 2 David Konecny 2011-09-20 21:37:09 UTC
*** Bug 186864 has been marked as a duplicate of this bug. ***
Comment 3 Martin Janicek 2011-11-02 14:11:33 UTC
Reassigning to WS product
Comment 4 Denis Anisimov 2011-11-02 15:57:56 UTC
The NPE appears on the line :
        servlet.setLoadOnStartup(new java.math.BigInteger("1"));

It means null value for servlet var.
The latter variable is created on the previous line :
Servlet servlet = (Servlet)webApp.addBean("Servlet", new String[]{"ServletName","ServletClass"}, 
                new Object[]{servletName, SERVLET_CLASS_NAME}, "ServletName"); 

So the issue is somewhere inside DD module.
I reviewed various implementations of WebApp interface ( the type of webApp var )
and don't see how it can return null value ( there is a possibility for that but
in this case other NPE would have thrown previously ).
Probably I missed some implementations or something else.
So I can't realize the problem without additional information.

Please provide exact steps to reproduce.