A real-world Oracle BI Publisher troubleshooting scenario where the report query worked perfectly in the Data Model but failed during Excel output generation with the error Index -1 out of bounds for length 9. In this post we will see how to fix the issue and how to download the diagnostics logs in Oracle Fusion BIP
Issue Details
The SQL query was running perfectly in the Data Model and returning data successfully. However, when generating the report in Excel format, the report failed with the below error:
Index -1 out of bounds for length 9
At first glance, it looked like a SQL issue or optimizer hint problem, but after checking the diagnostic logs carefully, the actual issue turned out to be something completely different.
This is a classic BI Publisher Excel template issue that many developers can face during report development.
How to download Diagnostics Logs
- Open the report and first enable the diagnostics
- Click on Actions → Online Diagnostics → Enable Diagnostics
- Now select the parameters and run the report again.
- Now, download the Diagnostics logs by clicking on Actions → Online Diagnostics → Download Diagnostics
- Now open the downloaded Diagnostics Logs and at the end of the log file you will find the error details:
The online diagnostic logs showed the following:
java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 9
at oracle.xdo.template.excel.object.SheetObject.addComponent
at oracle.xdo.template.excel.object.BookManager.collectAllNameObjects
This was the key clue.
Initial Assumption Initially, I suspected:
- SQL optimizer hints
- Complex CTEs
- BI Publisher parser limitation
However, the query itself was executing successfully in the Data Model, which meant:
SQL was NOT the actual problem.
Root Cause- After further investigation, I found that:
Two columns had been deleted from the Excel template,
but their references were still present in Excel Name Manager.
Because of these broken references, BI Publisher’s Excel parser failed internally while processing the template.
This caused:
ArrayIndexOutOfBoundsException
during Excel rendering.
- BI Publisher Excel templates internally maintain:
- Named ranges
- Cell mappings
- Repeating group references
- XDO metadata references
- When columns or rows are deleted manually in Excel:
- Excel may leave orphan references behind
- Name Manager can still contain invalid entries
- BI Publisher tries to resolve them
- Internal parser receives invalid index values
Fix- Open the Excel Template and click on Formulas → Name Manager
- Look for entries containing #REF! and Delete them
- After removing invalid named references:
- Save the template
- Upload it again
- Run the report
- The report worked successfully.

Comments
Post a Comment