[Fusion] How to fix “Index -1 out of bounds for length 9” Error in Oracle BI Publisher Excel Report

 



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

All Categories

Call Fusion BIP Report2 Change Password1 Code Combinations2 Compute Instance2 CTE1 Custom Images1 Customer1 Data Aggregation2 Database5 Date Conversion1 DB Adapter2 Decryption1 Development1 EBS5 Encryption1 ESS Jobs3 Examine1 FBDI3 Fusion APIs1 Fusion BIP7 GIT2 GL3 GL Journals1 GL_DAILY_CONVERSION_TYPES1 GL_DAILY_RATES1 ICS1 Identity Domain1 Integrations1 Java1 Journal Import1 Keys1 Legal Entity1 LookupTypeLOV1 LOV1 LOVs1 MultiPartAPIs1 Networking1 NVL2 NVL in OIC2 OCI13 OCI Billing1 OCI Compute6 OCI Cost Management1 OCI Events Service1 OCI Free Tier3 oci networking1 OCI Notifification Service1 OCI Security3 OIC4 OIC Mapper2 Oracle26 Oracle ADF17 Oracle APEX1 Oracle Apps60 Oracle Apps R127 Oracle ATP1 Oracle BIP8 Oracle Cloud13 Oracle Cloud Free Tier1 Oracle cloud Infrastructure10 Oracle Cloud Security2 Oracle Cloud VM1 Oracle DB4 oracle ebs6 Oracle ERP4 Oracle ERP Adapter2 Oracle ERP Cloud7 Oracle financials2 Oracle Forms1 Oracle Fusion57 Oracle Fusion BIP4 Oracle Fusion ERP17 Oracle Fusion Financials18 Oracle Integration Cloud3 Oracle OAF17 Oracle OCI14 Oracle OIC22 Oracle SOA 12c10 Oracle SQL17 Oracle VBCS1 Oracle VBS2 Oracle Visual Builder Cloud Service1 Oracle Visual Builder Studio2 Oracle Workflow Notifications1 OracleCloudTutorial1 Others10 Payables2 Payables Import1 Programs1 Properties1 R121 Register BIP as ESS Job1 Reset Password1 Responsibility1 REST4 Security List1 Site Map1 SOAP2 SOAP API2 SOAP UI3 SQL16 SQL Functions3 SQL Queries14 SQL Query8 SQL Tips3 SSH1 TCA1 Value Sets1 VBCS1 vcn1 Virtual Machine2 Virtual Machines1 XML1 XSLT1
Show more