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

**URL:** <https://forum.inductiveautomation.com/t/arrayindexoutofboundsexception-7-7-error-when-binding-sql-query-to-table-data-property/42885>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [February 2, 2021, 2:35pm UTC](https://forum.inductiveautomation.com/t/arrayindexoutofboundsexception-7-7-error-when-binding-sql-query-to-table-data-property/42885 "2021-02-02T14:35:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [February 2, 2021, 2:35pm UTC](https://forum.inductiveautomation.com/t/arrayindexoutofboundsexception-7-7-error-when-binding-sql-query-to-table-data-property/42885/1 "2021-02-02T14:35:30Z")

</div>

Using Ignition 8.0.12.

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

```auto
SELECT * 
FROM pathreconciliation
WHERE depth=2

```

and it is throwing me this error in designer -

```auto
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 -

```auto
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.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 2, 2021, 2:42pm UTC](https://forum.inductiveautomation.com/t/arrayindexoutofboundsexception-7-7-error-when-binding-sql-query-to-table-data-property/42885/2 "2021-02-02T14:42:51Z")

</div>

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.
