Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

ColdFusion 2018: Receiving java.lang.ArrayIndexOutOfBoundsException on some Query of Queries (QofQ)

Contributor ,
Nov 26, 2021 Nov 26, 2021

I just upgraded a server from ACF 2016 to ACF 2018 and I started receiving a strange java.lang.ArrayIndexOutOfBoundsException error message on some Query of Query (QofQ) statements.  What's strange is that the exception only occurs when I have SELECT * in the statement.  When I actually specify the columns by name, the exception goes away.

 

Unfortunately I can't replace the issue on www.trycf.com because I need an actual database query to start from.

 

Here's a simplified example of a query that throws the exception:

 

 

 

<cfquery dbtype="query" name="tempInvoices">
SELECT *
FROM invoices
</cfquery>

 

 

 
Replacing it with the column names (or this), fixes the issue:
 

 

 

<cfquery dbtype="query" name="tempInvoices">
SELECT #invoices.columnList#  <!--- I can also list out the columns and it works --->
FROM invoices
</cfquery>

 

 

The exception looks like this:

Homestar9_0-1637956218431.png

Has anyone else encountered this before?  This feels like a bug in ACF 2018 since it worked in ACF 2016 and earlier.

Edit: This may be the result of a bug introduced in ACF 2018 Update 12 as noted here:
https://tracker.adobe.com/#/view/CF-4212389

My example doesn't have the ORDER BY column like the example in the bug report, but it sounds like similar behavior.  Hopefully the fix will be included in the next update.

1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Nov 26, 2021 Nov 26, 2021
Translate
Contributor ,
Nov 26, 2021 Nov 26, 2021
LATEST
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources