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 248091 - NullPointerException at org.netbeans.modules.websvc.saas.codegen.ui.SoapServiceClientEditorDrop$1.run
Summary: NullPointerException at org.netbeans.modules.websvc.saas.codegen.ui.SoapServi...
Status: RESOLVED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: Manager (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Jan Stola
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-22 08:11 UTC by lorthirk
Modified: 2015-04-14 03:05 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 152722


Attachments
stacktrace (312 bytes, text/plain)
2014-10-22 08:11 UTC, lorthirk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lorthirk 2014-10-22 08:11:22 UTC
Build: NetBeans IDE 8.0.1 (Build 201409082112)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b70, Java(TM) SE Runtime Environment, 1.8.0-b132
OS: Windows 8

User Comments:
GUEST: drag&drop a webservice in my class

GUEST: dragged web serivice node to the code

lorthirk: Dragging a WS in code

GUEST: trying to implement webservice :(




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.websvc.saas.codegen.ui.SoapServiceClientEditorDrop$1.run(SoapServiceClientEditorDrop.java:168)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
   at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Comment 1 lorthirk 2014-10-22 08:11:25 UTC
Created attachment 150042 [details]
stacktrace
Comment 2 Jan Stola 2015-04-13 13:41:20 UTC
The exception is thrown on the following line:

dialog[0].close();

The exception shows that dialog[0] is null. This code is in a RequestProcessor task and dialog[0] is initialized at the beginning of this task using SwingUtilities.invokeLater(). This is not a good idea as the initialization may not happen before dialog[0] is used from the RequestProcessor thread (the usage outside event-dispatch thread itself is a bad idea, but this is another story). I have changed invokeLater() to invokeAndWait() to make sure that the initialization is finished before usage of dialog[0].

Modified file: https://hg.netbeans.org/web-main/rev/a8a582e04ace
Comment 3 Quality Engineering 2015-04-14 03:05:36 UTC
Integrated into 'main-silver', will be available in build *201504140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a8a582e04ace
User: Jan Stola <jstola@netbeans.org>
Log: #248091: NullPointerException at org.netbeans.modules.websvc.saas.codegen.ui.SoapServiceClientEditorDrop$1.run