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 169050 - NullPointerException at org.netbeans.modules.maven.jaxws.wizards.JaxWsServiceCreator$5.run
Summary: NullPointerException at org.netbeans.modules.maven.jaxws.wizards.JaxWsService...
Status: RESOLVED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: JAX-WS (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Milan Kuchtiak
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-23 13:51 UTC by chrnb
Modified: 2010-08-13 03:07 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 147046


Attachments
stacktrace (1.40 KB, text/plain)
2009-07-23 13:52 UTC, chrnb
Details
WSDL (5.81 KB, text/xml)
2009-07-30 16:33 UTC, chrnb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description chrnb 2009-07-23 13:51:57 UTC
Build: NetBeans IDE 6.7 (Build 200906241340)
VM: Java HotSpot(TM) Client VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Windows XP, 5.1, x86

User Comments:
GUEST: creating WS from WSDL

chrnb: create a new maven webapp project
create web service from WSDL



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.maven.jaxws.wizards.JaxWsServiceCreator$5.run(JaxWsServiceCreator.java:414)
        at org.netbeans.modules.maven.jaxws.wizards.JaxWsServiceCreator$5.run(JaxWsServiceCreator.java:402)
        at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:647)
        at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:129)
        at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:113)
        at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:189)
Comment 1 chrnb 2009-07-23 13:52:02 UTC
Created attachment 85134 [details]
stacktrace
Comment 2 Milan Kuchtiak 2009-07-30 16:26:18 UTC
Reporter, please can you provide the wsdl url from which you were trying to ceate web service implementation ?
I cannot reproduce this issue.
Comment 3 chrnb 2009-07-30 16:33:26 UTC
Created attachment 85552 [details]
WSDL
Comment 4 Milan Kuchtiak 2009-08-06 12:19:35 UTC
Thanks for wsdl file
Comment 5 Exceptions Reporter 2010-07-02 10:26:18 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=147046
Comment 6 Milan Kuchtiak 2010-08-11 15:38:35 UTC
Reason for this exception is the inability of JAXB xjc utility (called by JAX-WS) to generate classes from this wsdl. The "CancelImageResponse" element and "CancelImageResponse" complex type has the same name. 

The workaround is to rename "CancelImageResponse" type (e.g. to "CancelImageResponseType") :

      <s:element name="CancelImageResponse">
        <s:complexType>
          <s:sequence>
            <s:element maxOccurs="1" minOccurs="1" name="cancelImageResponse" nillable="true" type="tns:CancelImageResponseType"/>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:complexType name="CancelImageResponseType">
         ...
      </s:complexType>

Another workaround is to use jaxb customization to force xjc generate another java class name for "CancelImageResponse" type.

Nevertheless, we should avoid throwing NPE.
Comment 7 Milan Kuchtiak 2010-08-12 09:19:47 UTC
Fixed:
http://hg.netbeans.org/web-main/rev/086c24dd76b0
Comment 8 Quality Engineering 2010-08-13 03:07:46 UTC
Integrated into 'main-golden', will be available in build *201008130001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/086c24dd76b0
User: mkuchtiak@netbeans.org
Log: #169050: fixed NPE - show the dialog instead