Bug 44944 - Unable to construct record instance
Summary: Unable to construct record instance
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-dev
Hardware: PC Windows XP
: P1 blocker (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-06 13:32 UTC by Jen
Modified: 2008-05-06 14:18 UTC (History)
0 users



Attachments
sample excel sheet with data validation and formulas created with MS excel 2003 (25.00 KB, application/msexcel)
2008-05-06 13:32 UTC, Jen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jen 2008-05-06 13:32:58 UTC
Created attachment 21927 [details]
sample excel sheet with data validation and formulas created with MS excel 2003

Hi,

I am having trouble opening the attached excel file to read and write. I am getting the errors below. I am using POI poi-3.0.2-FINAL-20080204.jar. Any help would be appreciated. Thanks.

Jen

Exception in thread "main" org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance
	at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:199)
	at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:117)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:207)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:148)
	at parseExcelToXML.ParseExcel.main(ParseExcel.java:48)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
	at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:187)
	... 4 more
Caused by: java.lang.ArrayIndexOutOfBoundsException
	at org.apache.poi.hssf.record.RecordInputStream.checkRecordPosition(RecordInputStream.java:132)
	at org.apache.poi.hssf.record.RecordInputStream.readShort(RecordInputStream.java:152)
	at org.apache.poi.hssf.util.HSSFCellRangeAddress.fillFields(HSSFCellRangeAddress.java:77)
	at org.apache.poi.hssf.util.HSSFCellRangeAddress.<init>(HSSFCellRangeAddress.java:65)
	at org.apache.poi.hssf.record.DVRecord.fillFields(DVRecord.java:207)
	at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
	at org.apache.poi.hssf.record.DVRecord.<init>(DVRecord.java:134)
	... 9 more
Comment 1 Jen 2008-05-06 14:18:51 UTC
Update: I have tried with the latest build poi-3.1-beta2-20080506.jar and the issue went away. Thanks.