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 (Build 201403101706) VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b69, Java(TM) SE Runtime Environment, 1.8.0-b128 OS: Windows 7 User Comments: rkamradt: running ant targets Stacktrace: java.lang.NullPointerException at org.apache.tools.ant.module.api.support.TargetLister$Script.<init>(TargetLister.java:296) at org.apache.tools.ant.module.api.support.TargetLister.getTargets(TargetLister.java:117) at org.apache.tools.ant.module.run.RunTargetsAction$LazyMenu.getPopupMenu(RunTargetsAction.java:197) at com.jidesoft.plaf.vsnet.VsnetMenuUI.installListeners(VsnetMenuUI.java:0) at com.jidesoft.plaf.vsnet.VsnetMenuItemUI.installUI(VsnetMenuItemUI.java:0) at javax.swing.JComponent.setUI(JComponent.java:663)
Created attachment 148005 [details] stacktrace
funny. Initially caused by com.jidesoft.plaf.vsnet platform (whatever that is). The NPE is thrown because RunTargetsAction$LazyMenu has project set to null. Or more precisely call to RunTargetsAction$LazyMenu.getPopupMenu is done from LazyMenu.super() when LazyMenu is not yet fully initialized and the field project has not yet been set. Either reassign to 3rd-party (preferably) in case you don't want to fix it (i guess could be worked-around with returning just super.getPopupMenu in case constructor has not yet finished.)
let try, hopefully, to avoid the NPE
fixed in core-main #fbd2d37da0d5
Integrated into 'main-silver', will be available in build *201407230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/fbd2d37da0d5 User: Tomas Stupka <tstupka@netbeans.org> Log: Issue #245600 - NullPointerException at org.apache.tools.ant.module.api.support.TargetLister$Script.<init>
*** Bug 247511 has been marked as a duplicate of this bug. ***
*** Bug 248399 has been marked as a duplicate of this bug. ***
*** Bug 256123 has been marked as a duplicate of this bug. ***