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 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)
Created attachment 150042 [details] stacktrace
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
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