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 82519 - REGRESSION: ArrayIndexOutOfBoundsException when deleting schema
Summary: REGRESSION: ArrayIndexOutOfBoundsException when deleting schema
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Ayub Khan
URL:
Keywords:
: 82481 82516 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-08-11 18:55 UTC by htt
Modified: 2006-09-14 18:05 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description htt 2006-08-11 18:55:10 UTC
Create a Java App.
Open a new or sample schema.
In Projects, right-click the schema file and select Delete
=> schema is deleted, but the following NPE is thrown anyhow

java.lang.reflect.UndeclaredThrowableException
        at $Proxy9.resultChanged(Unknown Source)
        at
org.openide.util.lookup.ProxyLookup.setLookups(ProxyLookup.java:166)
        at
org.openide.explorer.DefaultEMLookup.updateLookups(DefaultEMLookup.java:110)
        at
org.openide.explorer.DefaultEMLookup.propertyChange(DefaultEMLookup.java:142)
        at
org.openide.util.WeakListenerImpl$PropertyChange.propertyChange(WeakListenerImpl.java:151)
        at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
        at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
[catch] at
org.openide.explorer.ExplorerManager$2.run(ExplorerManager.java:776)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
        at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:416)
        ... 15 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
        at
org.netbeans.modules.xml.schema.core.actions.SchemaTransformAction.getSchemaModel(SchemaTransformAction.java:69)
        at
org.netbeans.modules.xml.schema.core.actions.SchemaTransformAction.enable(SchemaTransformAction.java:92)
        at
org.openide.util.actions.NodeAction$DelegateAction.resultChanged(NodeAction.java:567)
        ... 19 more
==>
java.lang.reflect.InvocationTargetException
        at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:416)
        at $Proxy9.resultChanged(Unknown Source)
        at
org.openide.util.lookup.ProxyLookup.setLookups(ProxyLookup.java:166)
        at
org.openide.explorer.DefaultEMLookup.updateLookups(DefaultEMLookup.java:110)
        at
org.openide.explorer.DefaultEMLookup.propertyChange(DefaultEMLookup.java:142)
        at
org.openide.util.WeakListenerImpl$PropertyChange.propertyChange(WeakListenerImpl.java:151)
        at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
        at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
[catch] at
org.openide.explorer.ExplorerManager$2.run(ExplorerManager.java:776)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
        at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
        at
org.netbeans.modules.xml.schema.core.actions.SchemaTransformAction.getSchemaModel(SchemaTransformAction.java:69)
        at
org.netbeans.modules.xml.schema.core.actions.SchemaTransformAction.enable(SchemaTransformAction.java:92)
        at
org.openide.util.actions.NodeAction$DelegateAction.resultChanged(NodeAction.java:567)
        ... 19 more
==>
java.lang.ArrayIndexOutOfBoundsException: 0
        at
org.netbeans.modules.xml.schema.core.actions.SchemaTransformAction.getSchemaModel(SchemaTransformAction.java:69)
        at
org.netbeans.modules.xml.schema.core.actions.SchemaTransformAction.enable(SchemaTransformAction.java:92)
        at
org.openide.util.actions.NodeAction$DelegateAction.resultChanged(NodeAction.java:567)
        at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:416)
        at $Proxy9.resultChanged(Unknown Source)
        at
org.openide.util.lookup.ProxyLookup.setLookups(ProxyLookup.java:166)
        at
org.openide.explorer.DefaultEMLookup.updateLookups(DefaultEMLookup.java:110)
        at
org.openide.explorer.DefaultEMLookup.propertyChange(DefaultEMLookup.java:142)
        at
org.openide.util.WeakListenerImpl$PropertyChange.propertyChange(WeakListenerImpl.java:151)
        at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
        at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
[catch] at
org.openide.explorer.ExplorerManager$2.run(ExplorerManager.java:776)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
        at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Ayub Khan 2006-08-12 00:43:08 UTC
Fix checked into trunk.
/cvs/xml/schema/core/src/org/netbeans/modules/xml/schema/core/actions/Attic/SchemaTransformAction.java
new revision: 1.1.2.5; previous revision: 1.1.2.4
Comment 2 Chris Webster 2006-08-12 17:18:51 UTC
*** Issue 82516 has been marked as a duplicate of this issue. ***
Comment 3 Ayub Khan 2006-08-14 22:00:18 UTC
*** Issue 82481 has been marked as a duplicate of this issue. ***
Comment 4 Ayub Khan 2006-08-15 07:31:00 UTC
Fixed in trunk (release55) for FCS

Files affected:

/cvs/xml/schema/core/src/org/netbeans/modules/xml/schema/core/actions/Attic/SchemaTransformAction.java,v
 
new revision: 1.1.2.6; previous revision: 1.1.2.5

/cvs/xml/schema/core/src/org/netbeans/modules/xml/schema/core/Attic/SchemaEditorSupport.java,v

new revision: 1.1.2.17; previous revision: 1.1.2.16
Comment 5 htt 2006-08-22 18:13:45 UTC
Verified in trunk build 060821.