Bug 62704 - getting java.lang.ArrayIndexOutOfBoundsException
Summary: getting java.lang.ArrayIndexOutOfBoundsException
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 4.0.0-FINAL
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2018-09-11 13:44 UTC by Mark Giordano
Modified: 2021-10-10 16:04 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Mark Giordano 2018-09-11 13:44:59 UTC
We downloaded the latest version of poi-4.0.0 and are running that in conjunction with java 8.0.  We previously used the hssfFormulaEvaluator(book); in our program when we were running poi 3.17 with java 5.0 32 bit.  Everything worked.  When we try to run now this is the only problem we seem to have.

It was suggested this could be a bug.  thank you.

Message . . . . :   Java exception received when calling Java method.         
Cause . . . . . :   RPG procedure RATSUPXLS in program JAMAICA/RATSUPXLS      
  received Java exception "java.lang.ArrayIndexOutOfBoundsException: Array    
  index out of range: -2" when calling method "evaluateAllFormulaCells" with  
  signature "(Lorg.apache.poi.hssf.usermodel.HSSFWorkbook;)V" in class        
Comment 1 Nick Burch 2018-09-11 14:06:46 UTC
If you temporarily switch from doing evaluate all, and instead loop over all the sheets then rows then cells yourself to evaluate each one individually, can you identify what the problematic formula is that triggers the bug?

And/or can you upload the excel file you're using to trigger the exception?
Comment 2 PJ Fanning 2021-10-10 16:04:52 UTC
no test case provided - reopen if you can provide one