Bug 45912 - reading Worksheet with the camera tool throws RecordFormatException.
Summary: reading Worksheet with the camera tool throws RecordFormatException.
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.1-FINAL
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-29 23:38 UTC by rokugen
Modified: 2008-10-27 16:21 UTC (History)
0 users



Attachments
with the camera tool (27.50 KB, application/octet-stream)
2008-09-29 23:38 UTC, rokugen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rokugen 2008-09-29 23:38:59 UTC
Created attachment 22645 [details]
with the camera tool

when i read the workbook with the object made by the camera tool and new HSSFWorkbook, it throws RecordFormatException. 

the sample workbook is attached.

stack trace:

org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance
	at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:208)
	at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:126)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:246)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:169)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:298)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:279)

Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:196)
	... 22 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.record.EmbeddedObjectRefSubRecord.fillFields(EmbeddedObjectRefSubRecord.java:89)
	at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
	at org.apache.poi.hssf.record.SubRecord.<init>(SubRecord.java:34)
	at org.apache.poi.hssf.record.EmbeddedObjectRefSubRecord.<init>(EmbeddedObjectRefSubRecord.java:64)
	at org.apache.poi.hssf.record.SubRecord.createSubRecord(SubRecord.java:62)
	at org.apache.poi.hssf.record.ObjRecord.fillFields(ObjRecord.java:81)
	at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
	at org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:54)
	... 27 more
Comment 1 rokugen 2008-09-29 23:41:49 UTC
with 3.0-FINAL, it can work well.
Comment 2 Josh Micich 2008-10-27 16:21:35 UTC
fixed in svn r701569