You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Rajiv Poddar <ra...@gmail.com> on 2015/02/22 09:30:38 UTC

ArrayIndexOutOfBoundsException in poi3.11

Hi,
  I'm using POI 3.11 latest release to read an Excel file (.xls). While
reading, it gives following exception-

java.lang.ArrayIndexOutOfBoundsException: -32768
at
org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.insertCell(ValueRecordsAggregate.java:73)
~[poi-3.11-beta2.jar:3.11-beta2]
at
org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.construct(ValueRecordsAggregate.java:185)
~[poi-3.11-beta2.jar:3.11-beta2]
at
org.apache.poi.hssf.record.aggregates.RowRecordsAggregate.<init>(RowRecordsAggregate.java:99)
~[poi-3.11-beta2.jar:3.11-beta2]
at org.apache.poi.hssf.model.InternalSheet.<init>(InternalSheet.java:217)
~[poi-3.11-beta2.jar:3.11-beta2]
at
org.apache.poi.hssf.model.InternalSheet.createSheet(InternalSheet.java:156)
~[poi-3.11-beta2.jar:3.11-beta2]
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:326)
~[poi-3.11-beta2.jar:3.11-beta2]
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:278)
~[poi-3.11-beta2.jar:3.11-beta2]
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:213)
~[poi-3.11-beta2.jar:3.11-beta2]
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:361)
~[poi-3.11-beta2.jar:3.11-beta2]
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:342)
~[poi-3.11-beta2.jar:3.11-beta2]
at
org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:84)
~[poi-ooxml-3.11-20141221.jar:3.11]

Excel file has some pictures. If I remove pictures then it works fine. Is
this a known bug? any workaround till it's fixed and released?

Thanks,
Rajiv

Re: ArrayIndexOutOfBoundsException in poi3.11

Posted by Dominik Stadler <do...@gmx.at>.
Sounds like a bug, can you open a bugzilla entry with the two versions of
the file attached?

Thanks... Dominik
Am 22.02.2015 09:30 schrieb "Rajiv Poddar" <ra...@gmail.com>:

> Hi,
>   I'm using POI 3.11 latest release to read an Excel file (.xls). While
> reading, it gives following exception-
>
> java.lang.ArrayIndexOutOfBoundsException: -32768
> at
>
> org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.insertCell(ValueRecordsAggregate.java:73)
> ~[poi-3.11-beta2.jar:3.11-beta2]
> at
>
> org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.construct(ValueRecordsAggregate.java:185)
> ~[poi-3.11-beta2.jar:3.11-beta2]
> at
>
> org.apache.poi.hssf.record.aggregates.RowRecordsAggregate.<init>(RowRecordsAggregate.java:99)
> ~[poi-3.11-beta2.jar:3.11-beta2]
> at org.apache.poi.hssf.model.InternalSheet.<init>(InternalSheet.java:217)
> ~[poi-3.11-beta2.jar:3.11-beta2]
> at
> org.apache.poi.hssf.model.InternalSheet.createSheet(InternalSheet.java:156)
> ~[poi-3.11-beta2.jar:3.11-beta2]
> at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:326)
> ~[poi-3.11-beta2.jar:3.11-beta2]
> at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:278)
> ~[poi-3.11-beta2.jar:3.11-beta2]
> at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:213)
> ~[poi-3.11-beta2.jar:3.11-beta2]
> at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:361)
> ~[poi-3.11-beta2.jar:3.11-beta2]
> at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:342)
> ~[poi-3.11-beta2.jar:3.11-beta2]
> at
> org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:84)
> ~[poi-ooxml-3.11-20141221.jar:3.11]
>
> Excel file has some pictures. If I remove pictures then it works fine. Is
> this a known bug? any workaround till it's fixed and released?
>
> Thanks,
> Rajiv
>