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 190419 - JTable error when table refreshed with more then 1000 rows
Summary: JTable error when table refreshed with more then 1000 rows
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Binding (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-17 14:20 UTC by bigbob1000
Modified: 2011-11-16 16:39 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
code when refresh error occurs (42.57 KB, text/plain)
2010-09-17 14:22 UTC, bigbob1000
Details
code when refresh error occurs (2.84 KB, text/plain)
2010-09-17 14:23 UTC, bigbob1000
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bigbob1000 2010-09-17 14:20:40 UTC
Problem:  The following exception is thrown for when the 'Refresh' key is pressed.  This failure occurs only for large data tables, say over 16000 records from MySql.  Small tables work fine without error with the same generated code.

Other functions, 'Add', 'Delete' work fine and refresh correctly.

The application was generated with the standard Netbeans 6.9 Java Database application template.

This error is repeatable on more than one computer running Netbeans 6.9.1.

This is the offending code from the java.util library.

    private void RangeCheck(int index) {
	if (index >= size)
	    throw new IndexOutOfBoundsException(
		"Index: "+index+", Size: "+size);

note:  at the point this code fires, the variable 'index' = 16341 and 
'size' = 3270.

'index' is equal to the number of the record in the database that is being displayed in the jTable at the time that the 'refresh' key is pressed and this number is correct for the database in use.

It is not clear why 'size' = 3270.  Different numbers are returned for 'size' each time the program is run.






run:
[TopLink Info]: 2010.08.20 02:23:08.555--ServerSession(15628820)--TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
[TopLink Info]: 2010.08.20 02:23:08.976--ServerSession(15628820)--file:/C:/Users/Mike/Documents/NetBeansProjects/Member5/build/classes/-POFPU login successful
Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 16341, Size: 3270
        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
        at java.util.ArrayList.get(ArrayList.java:322)
        at org.jdesktop.swingbinding.impl.ListBindingManager$ColumnDescriptionManager.validateBinding(ListBindingManager.java:191)
        at org.jdesktop.swingbinding.impl.ListBindingManager.valueAt(ListBindingManager.java:99)
        at org.jdesktop.swingbinding.JTableBinding$BindingTableModel.getValueAt(JTableBinding.java:713)
        at javax.swing.JTable.getValueAt(JTable.java:2695)
        at javax.swing.JTable.prepareRenderer(JTable.java:5712)
        at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2069)
        at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1971)
        at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1767)
        at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
        at javax.swing.JComponent.paintComponent(JComponent.java:751)
        at javax.swing.JComponent.paint(JComponent.java:1017)
        at javax.swing.JComponent.paintToOffscreen(JComponent.java:5112)
        at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1475)
        at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1406)
        at javax.swing.RepaintManager.paint(RepaintManager.java:1220)
        at javax.swing.JComponent._paintImmediately(JComponent.java:5060)
        at javax.swing.JComponent.paintImmediately(JComponent.java:4870)
        at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:803)
        at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
        at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:694)
        at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:125)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Comment 1 bigbob1000 2010-09-17 14:22:24 UTC
Created attachment 102059 [details]
code when refresh error occurs
Comment 2 bigbob1000 2010-09-17 14:23:29 UTC
Created attachment 102060 [details]
code when refresh error occurs