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.
Right click on source editor cause a NPE. This prevent the menu from opening. #1 the stacktrace : java.lang.NullPointerException at org.netbeans.modules.j2ee.ejbcore.api.methodcontroller.EjbMethodController.createFromClass(EjbMethodController.java:64) at org.netbeans.modules.j2ee.ejbcore.ui.logicalview.ejb.action.EJBActionGroup.enable(EJBActionGroup.java:87) at org.openide.util.actions.NodeAction$DelegateAction.resultChanged(NodeAction.java:560) at org.openide.util.actions.NodeAction$DelegateAction.<init>(NodeAction.java:506) at org.openide.util.actions.NodeAction.createContextAwareInstance(NodeAction.java:306) at org.netbeans.modules.j2ee.ejbcore.ui.logicalview.ejb.action.EJBActionGroup.createContextAwareInstance(EJBActionGroup.java:122) at org.netbeans.modules.editor.NbEditorKit$NbBuildPopupMenuAction.translateContextLookupAction(NbEditorKit.java:332) at org.netbeans.modules.editor.NbEditorKit$NbBuildPopupMenuAction.addAction(NbEditorKit.java:377) at org.netbeans.modules.editor.NbEditorKit$NbBuildPopupMenuAction.buildPopupMenu(NbEditorKit.java:287) at org.netbeans.editor.ext.ExtKit$BuildPopupMenuAction.actionPerformed(ExtKit.java:230) at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:228) at org.netbeans.editor.ext.ExtEditorUI.showPopupMenu(ExtEditorUI.java:139) at org.netbeans.editor.ext.ExtCaret.showPopup(ExtCaret.java:359) at org.netbeans.editor.ext.ExtCaret.mouseReleased(ExtCaret.java:366) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:232) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5957) at javax.swing.JComponent.processMouseEvent(JComponent.java:3280) at java.awt.Component.processEvent(Component.java:5722) at java.awt.Container.processEvent(Container.java:1966) at java.awt.Component.dispatchEventImpl(Component.java:4365) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:4195) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4228) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822) at java.awt.Container.dispatchEventImpl(Container.java:2010) at java.awt.Window.dispatchEventImpl(Window.java:2300) at java.awt.Component.dispatchEvent(Component.java:4195) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121) #2 Example File: package info.aide.assistance.bean; import java.math.BigDecimal; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.TableGenerator; /** * * @author BJB */ @Entity public class TaxRow { /** Creates a new instance of TaxRow */ public TaxRow() { } /** * Technical identifier */ private long identifier; /** * Invoice that is holding this row */ private Invoice invoice; /** * The tax amount */ BigDecimal amount; /** * The amount that was used to compute the tax amount */ BigDecimal baseAmount; /** * The tax ratio that was applied */ BigDecimal taxRatio; /** * The tax description */ String taxDescription; @Id //@Column(nullable=false, unique=true, updatable=false,insertable=false) @TableGenerator(name = "TAXROW_SEQUENCE", table = "IDGENERATOR", pkColumnName = "SEQ_NAME", valueColumnName = "SEQ_COUNT", pkColumnValue = "TAXROWIDENTIFIER", initialValue=0, allocationSize=1) @GeneratedValue(strategy = GenerationType.TABLE, generator = "TAXROW_SEQUENCE") public long getIdentifier() { return identifier; } public void setIdentifier(long identifier) { this.identifier = identifier; } @ManyToOne(optional=false,targetEntity=Invoice.class,cascade= CascadeType.PERSIST) @JoinColumn(name="INVOICE_IDENTIFIER",nullable=false,referencedColumnName="IDENTIFIER") public Invoice getInvoice(){ return invoice; } public void setInvoice(Invoice invoice) { this.invoice = invoice; } }
I am not able to reproduce this issue, even when using the class you provided, is it still reproducible for you? If so, can you give more information on the project you used? Would not it be possible to attach it? Or at least some simplified version containing just few source files needed for the reproduction?
I got a very similar exception, when I tried right-clicked in editor with a plain Java file opened (ResultView.java from the Utilities module): java.io.IOException at o.n.api.java.source.JavaSource.runModificationTask(:562) at o.n.m.j2ee.ejbcore.ui.logicalview.ejb.action.EJBActionGroup.enable(:107) at o.o.util.actions.NodeAction.isEnabled(:180) at o.n.m.j2ee.ejbcore.ui.logicalview.ejb.action.EJBActionGroup.getPopupPresenter (:75) at o.o.util.actions.NodeAction$DelegateAction.getPopupPresenter(:605) at o.n.m.editor.NbEditorKit$NbBuildPopupMenuAction.createLocalizedMenuItem(:347) ... This was not the first time I got this exception but it is random. I do not know whether this is the same exception/bug. Should I file a separate issue? -- NetBeans IDE Dev (Build 070215) 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105 Linux version 2.6.14-1.1656_FC4 running on i386 en_US (nb); UTF-8
Both exceptions are already fixed.
I have not seen any of the mentioned exceptions for a long time - verified.