ArrayIndexOutOfBoundsException: 7 >= 7 - Error when binding SQL query to Table data property

Using Ignition 8.0.12.

I have a table with the following query in the data property -

SELECT * 
FROM pathreconciliation
WHERE depth=2

and it is throwing me this error in designer -

java.lang.Exception: Error setting property to 'Dataset [0R ⅹ 11C]' for binding on
Popup_ServerFolder.Root Container.Table_Locations.data
	at com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter.updateTarget(AbstractPropertyAdapter.java:328)
	at com.inductiveautomation.factorypmi.application.binding.SQLPropertyAdapter.updateTarget(SQLPropertyAdapter.java:293)
	at com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter.updateValue(AbstractPropertyAdapter.java:266)
	at com.inductiveautomation.factorypmi.application.binding.SQLPropertyAdapter.handleQueryReturnedValue(SQLPropertyAdapter.java:330)
	at com.inductiveautomation.factorypmi.application.gateway.QueryManager$HandleReturnValueTask.run(QueryManager.java:477)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 7 >= 7
	at java.base/java.util.Vector.elementAt(Unknown Source)
	at java.desktop/javax.swing.table.DefaultTableColumnModel.getColumn(Unknown Source)
	at com.inductiveautomation.factorypmi.application.components.table.HMITableColumnModel.tableChanged(HMITableColumnModel.java:129)
	at java.desktop/javax.swing.table.AbstractTableModel.fireTableChanged(Unknown Source)
	at java.desktop/javax.swing.table.AbstractTableModel.fireTableDataChanged(Unknown Source)
	at com.inductiveautomation.ignition.client.util.gui.table.SortTableModel._sortOrig(SortTableModel.java:379)
	at com.inductiveautomation.ignition.client.util.gui.table.SortTableModel.tableChanged(SortTableModel.java:230)
	at java.desktop/javax.swing.table.AbstractTableModel.fireTableChanged(Unknown Source)
	at java.desktop/javax.swing.table.AbstractTableModel.fireTableStructureChanged(Unknown Source)
	at com.inductiveautomation.factorypmi.application.components.PMITable$DataSetTableModel.update(PMITable.java:2094)
	at com.inductiveautomation.factorypmi.application.components.PMITable.setData(PMITable.java:556)
	at jdk.internal.reflect.GeneratedMethodAccessor156.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter.updateTarget(AbstractPropertyAdapter.java:321)
	... 17 more

Ignition v8.0.14 (b2020062220)
Java: Azul Systems, Inc. 11.0.6

Oddly enough i have another table on the same window with a similar query that does not give me an error -

SELECT * 
FROM pathreconciliation
WHERE depth=1 {Root Container.Table_Customers.whereClause}
ORDER BY fullPath

Any ideas what could be causing an ArrayIndexOutOfBoundsException for a SQL Query binding? I have no extension scripts on either table.

Create a brand new table and copy that binding to it. Then try to cut the troublesome table. I suspect you get an error due to some other binding. If it does cut, then you’ll probably get an error elsewhere when you preview.

1 Like