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.
Open Enterpise Bean, Web Service or Servlet, right-click in editor and select Enterpise Resources menu. All submenu items (Call EJB,...) are disabled. If you close menu and open it again then submenu items are enabled. This bug causes problem for automated tests and now many tests fail.
I saw this behaviour many times, but still it's not 100% reproducible. I will investigate more.
Steps to reproduce: 1) open any closed EJB (reproducible only when closed EJB is opened) 2) right click -> All subitems in Enterprise resurces menu are disabled When: build 20050714 - OK build 20050715 - reproducible Why: getLookup(Element.class) called on JavaNode returns null (on second try, when it is succesfull, it return JavaClass) I don't see any related commit in J2EE CVS mailing list. It is possible (but not sure) that it's caused by change somewhere else...
if you used jinlinemenu before, then this could have worked because the menu listened to changes while it's visible and updated. That doesn't work anymore because it doesn't work on macosx. let me know where the appropriate code is and I will check it.
In Call EJB action in Java editor popup there are 2 types of nodes passed as parameters to enable(Node[] nodes) method. After opening Java class (from EJB logical view) and invoking popup I receive this as parameter of enable() action: org.netbeans.modules.java.JavaNode@327473[Name=NewSessionBean, displayName=NewSessionBean.java] Then I cancel the menu a invoke it again and following is passed to enable(): org.netbeans.modules.refactoring.ui.RefactoringFilterNode@df574d[Name=NewSessionBean, displayName=NewSessionBean] Then it's always RefactoringFilterNode. I would expect same node all the times. We are using passed node for lookup for JMI Element.class and in first case it always returns null. Probably we should check our code also, because our implementation is working only if RefactoringFilterNode is passed and that seems wrong to me. It should be independent on refactoring.
Fixed. Anyway there is some regression in core/java with nodes and responsible people should be aware of that. http://j2ee.netbeans.org/source/browse/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/logicalview/entres/SendJMSMessageAction.java?r1=1.9&r2=1.10 http://j2ee.netbeans.org/source/browse/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/logicalview/entres/CallEjbAction.java?r1=1.16&r2=1.17 http://j2ee.netbeans.org/source/browse/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/logicalview/entres/SendEmailAction.java?r1=1.1&r2=1.2 http://j2ee.netbeans.org/source/browse/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/logicalview/entres/UseDatabaseAction.java?r1=1.7&r2=1.8
Menu is enabled now, but first invoking throws exception: java.lang.NullPointerException at org.netbeans.modules.j2ee.ejbjarproject.ui.logicalview.entres.CallEjbAction.performAction(CallEjbAction.java:38)
Created attachment 23554 [details] NullPointerException
Fixed. http://j2ee.netbeans.org/source/browse/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/logicalview/entres/CallEjbAction.java?r1=1.17&r2=1.18 http://j2ee.netbeans.org/source/browse/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/logicalview/entres/SendEmailAction.java?r1=1.2&r2=1.3 http://j2ee.netbeans.org/source/browse/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/logicalview/entres/SendJMSMessageAction.java?r1=1.10&r2=1.11 http://j2ee.netbeans.org/source/browse/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/logicalview/entres/UseDatabaseAction.java?r1=1.8&r2=1.9
verified