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 Dev (Build 200803250006) VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b13 OS: Windows XP, 5.1, x86 User Comments: 1. Add EJB to the IDE. 2. Create web application with "Visual Web JSF" framework. 3. Add Button component to the page. 4. Add EJB to the page. 5. Doubleclick Button component. Result: NullPointerException arises. Not sure that this issue is constantly reproducible.
Created attachment 59039 [details] stacktrace
Quy, please evaluate it, coming from EJB calls. Thanks!
Changeset: 28b3e3a84dac It looks like there was a race condition due to the ordering of the following UI events: 1) The addition of the jars to the classpath, which is triggered by the dragging of the mouse over the designer canvas. This is needed to provide the correct mouse cursor state when dragging through the designer. 2) The actual drop, which again tries to add the jars (because it uses the same mechanism as step #1) and instantiates the bean. 3) The switch from design view to the java view from double-clicking the button component. The Designtime API does not handle the use case of webservices/ejbs that need to extend the classpath before the bean can be created, so the hack in steps #1 and #2 is needed. Since the DnD mechanism does not allow the client direct access to the drop target, another hack is in place to obtain the current designer's project before the jars are added. If steps 2 and 3 are reversed due to the race condition, there will not be a selected designer so the project search will fail. In any case, an additional check has been added to do nothing if no project could be found. This should not affect any other use cases.
Verified with build 080326.