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 61197 - Enterprise Resources popup menu items are disabled
Summary: Enterprise Resources popup menu items are disabled
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Adamek
URL:
Keywords: T9Y
Depends on:
Blocks: 61694
  Show dependency tree
 
Reported: 2005-07-20 17:38 UTC by L Martinek
Modified: 2005-09-05 10:01 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NullPointerException (2.38 KB, text/plain)
2005-08-08 10:08 UTC, L Martinek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description L Martinek 2005-07-20 17:38:07 UTC
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.
Comment 1 Martin Adamek 2005-07-25 10:03:15 UTC
I saw this behaviour many times, but still it's not 100% reproducible. I will
investigate more.
Comment 2 Martin Adamek 2005-07-26 14:00:44 UTC
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...
Comment 3 Milos Kleint 2005-08-04 12:15:01 UTC
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.
Comment 4 Martin Adamek 2005-08-04 13:32:31 UTC
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.
Comment 6 L Martinek 2005-08-08 10:07:30 UTC
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)
Comment 7 L Martinek 2005-08-08 10:08:39 UTC
Created attachment 23554 [details]
NullPointerException
Comment 9 L Martinek 2005-08-24 10:52:59 UTC
verified