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 152658 - [65cat] IndexOutOfBoundsException: Index: -1, Size: 18
Summary: [65cat] IndexOutOfBoundsException: Index: -1, Size: 18
Status: RESOLVED WONTFIX
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Svata Dedic
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on: 126968
Blocks:
  Show dependency tree
 
Reported: 2008-11-07 11:03 UTC by sunbiz
Modified: 2013-04-08 12:20 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 89800


Attachments
stacktrace (3.48 KB, text/plain)
2008-11-07 11:04 UTC, sunbiz
Details
stacktrace (1.79 KB, text/plain)
2009-05-25 08:29 UTC, arnab_cemk
Details
stacktrace (1.70 KB, text/plain)
2010-02-04 10:47 UTC, mklaehn
Details
stacktrace (1.70 KB, text/plain)
2010-09-08 20:02 UTC, Michel Graciano
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sunbiz 2008-11-07 11:03:57 UTC
Build: NetBeans IDE Dev (Build 200811060201)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Windows Vista, 6.0, x86

User Comments:
sunbiz: Generating JSF pages from Entity Classes threw this exception

alexjava: The exception below happened while I was resolving a series of conflicts related to the lack of some libraries on this project that I am importing manually by netbeans 6.1 instead of leaving the automatic procedure for netbeans 6.5.
In another PC instead I tried the automatic procedure for import the same project and the problem has not presented.

vaccaridaniele: In the Servlets panel while editing web.xml and deleting some servlet.

sunbiz: Generating JSF pages from Entity Classes threw this exception



Stacktrace: 
java.lang.IndexOutOfBoundsException: Index: -1, Size: 18
        at java.util.ArrayList.add(ArrayList.java:367)
        at org.netbeans.modules.xml.text.navigator.TreeNodeAdapter.elementAdded(TreeNodeAdapter.java:333)
        at org.netbeans.modules.editor.structure.api.DocumentElement.fireDocumentElementEvent(DocumentElement.java:364)
        at org.netbeans.modules.editor.structure.api.DocumentElement.fireDocumentElementEvent(DocumentElement.java:352)
        at org.netbeans.modules.editor.structure.api.DocumentElement.childAdded(DocumentElement.java:374)
        at org.netbeans.modules.editor.structure.api.DocumentModel$DocumentModelModificationTransaction.fireElementAddedEvent(DocumentModel.java:1050)
Comment 1 sunbiz 2008-11-07 11:04:04 UTC
Created attachment 73456 [details]
stacktrace
Comment 2 jwinblad 2008-11-19 22:01:52 UTC
Valid bug, elementAdded() should handle the case when getVisibleChildIndex() returns possible return value of -1,
resulting in an invalid insertIndex.
Comment 3 jwinblad 2008-11-19 23:52:47 UTC
There are plans to re-write the XML navigator (see issue 126968) which will fix this issue
Comment 4 arnab_cemk 2009-05-25 08:29:01 UTC
Build: NetBeans IDE 6.5.1 (Build 200903060201)
VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.lang.IndexOutOfBoundsException: Index: -1, Size: 25
        at java.util.ArrayList.add(ArrayList.java:367)
        at org.netbeans.modules.xml.text.navigator.TreeNodeAdapter.elementAdded(TreeNodeAdapter.java:333)
        at org.netbeans.modules.editor.structure.api.DocumentElement.fireDocumentElementEvent(DocumentElement.java:364)
        at org.netbeans.modules.editor.structure.api.DocumentElement.fireDocumentElementEvent(DocumentElement.java:352)
        at org.netbeans.modules.editor.structure.api.DocumentElement.childAdded(DocumentElement.java:374)
        at org.netbeans.modules.editor.structure.api.DocumentModel$DocumentModelModificationTransaction.fireElementAddedEvent(DocumentModel.java:1050)
Comment 5 arnab_cemk 2009-05-25 08:29:10 UTC
Created attachment 82716 [details]
stacktrace
Comment 6 mklaehn 2010-02-04 10:47:31 UTC
Created attachment 93875 [details]
stacktrace
Comment 7 Michel Graciano 2010-09-08 20:02:11 UTC
Created attachment 101949 [details]
stacktrace
Comment 8 Svata Dedic 2013-04-08 12:20:10 UTC
No reports for >= 2.5 years; possibly an obsolete issue. In addition the XML navigator will be most probably rewritten in the future.