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.
When I open the inspector window after creating a page with Visual Web JSF, navigation window output strange result. Sometimes, it's displayed JSP structure, sometime become blank. Then, close navigation window and reopen it from window -> navigating -> navigator, now navigator window displayed '<No view Available>' and following exception is output in log file. [global] java.lang.ArrayIndexOutOfBoundsException: 1 at org.openide.util.lookup.ProxyLookup$R.lookupChange(ProxyLookup.java:393) at org.openide.util.lookup.ProxyLookup.setLookups(ProxyLookup.java:187) at org.netbeans.modules.project.ui.actions.LookupSensitiveAction$LastActivatedWindowLookup.updateLookups(LookupSensitiveAction.java:218) at org.netbeans.modules.project.ui.actions.LookupSensitiveAction$LastActivatedWindowLookup.propertyChange(LookupSensitiveAction.java:223) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270) at org.netbeans.core.windows.RegistryImpl.tryFireChanges(RegistryImpl.java:297) at org.netbeans.core.windows.RegistryImpl.selectedNodesChanged(RegistryImpl.java:233) at org.netbeans.core.windows.RegistryImpl.topComponentActivated(RegistryImpl.java:170) at org.netbeans.core.windows.WindowManagerImpl.notifyRegistryTopComponentActivated(WindowManagerImpl.java:984) at org.netbeans.core.windows.Central.addModeClosedTopComponent(Central.java:820) If I restart the netbeans6.0, navigation become correct one. To reproduce: 1. Create Visual Web JSF project. 2. Create a button in design editor 3. Confirm that navigator window is displayed that button 4. Open inspector window from window -> navigating -> inspector 5. Now navigation window displayed different from #3. 6. Close navigation window, and open again from window -> navigating -> navigator 7. '<No view Available>' is displayed in navigator window, and output Exception in log file.
I am seeing this exact same behavior. NetBeans 6.0 FCS on openSUSE 10.3.
It looks like there may be some contention between the JSP and JSF data loaders when rendering information in the Navigator window.
There is also the following related exception that occurs as well: java.lang.ArrayIndexOutOfBoundsException: 1 at org.openide.util.lookup.ProxyLookup$R.lookupChange(ProxyLookup.java:393) at org.openide.util.lookup.ProxyLookup.setLookups(ProxyLookup.java:187) at org.netbeans.modules.navigator.NavigatorController$ClientsLookup.beforeLookup(NavigatorController.java:652) at org.openide.util.lookup.ProxyLookup.lookup(ProxyLookup.java:232) at org.netbeans.modules.navigator.NavigatorController.updateContext(NavigatorController.java:354) at org.netbeans.modules.navigator.NavigatorController.updateContext(NavigatorController.java:256) at org.netbeans.modules.navigator.NavigatorController.access$700(NavigatorController.java:98) [catch] at org.netbeans.modules.navigator.NavigatorController$ActNodeSetter.run(NavigatorController.java:614) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) 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) To reproduce this, 1) Create/open a project with a single button component. 2) Select the button. The navigator should display the outline with the path to the button component 3) Open the inspector without deselecting the button 4) Close the inspector. The navigator should be visible again. 4) Click on the designer. The exception should occur here. It appears that in this case, the same DesignBeanNode is represented twice in the global activated node lookup result. This causes the exception in ProxyLookup$R.lookupChange(). This is not related to the jsf loader support but is probably an issue with the outline or the designer since the loader does not manage the designer's TopComponent.
This seems to be a problem of the navigator (see the stack trace), passing there.
I see this exception happening when working with normal java projects as well. However, in those cases, the navigator recovers and still displays information. Is there a reason why the visual web Outline stops working when the same exception occurs?
Finally got it and reproduced...trying to find what is going on.
Problem is really that array of activated nodes contains the same instance of DesignBeanNode twice. Navigator got such array from call of getPanelLookup().lookupAll(Node.class); where panel is visualweb's OutlineView. ProxyLookup can't survive such duplication of lookups from nodes then. Fixes should be provided on various places IMHO - OutlinePanel shoudn't duplicate nodes in its lookup, Navigator or TopComponent.setActivatedNodes should check for duplications and finally ProxyLookup should survive such situation. More on this tomorrow, I think I'll need consultation with jtulach on proxylookup thing.
Update after work with jtulach: visualweb's outline view is innocent, there are basically two problems: a) ProxyLookup can't handle situation when there is setLookups(...) called with array of two identical Lookups as its param, and then again called setLookups only on one lookup and all of this is happening in beforeLookup hook. Then ProxyLookup's internal structures go out of sync, namely "old" array and "weakL.results" array, causing exception above. I'm passing this problem to jtulach to fix. b) There is also Navigator infastructure problem, that is causing two identical Nodes being put as activated nodes of the navigator's TopComponent. This will be solved in separate issue -
Separate issue for b) is 125861
*** Issue 123023 has been marked as a duplicate of this issue. ***
Now, when I fixed issue 123679, I believe this one will be fixed as well. Please verify or reopen. *** This issue has been marked as a duplicate of 123679 ***
*** Issue 132549 has been marked as a duplicate of this issue. ***
Created attachment 62901 [details] stacktrace