Bug 45912

Summary: reading Worksheet with the camera tool throws RecordFormatException.
Product: POI Reporter: rokugen <rokugensai>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.1-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: with the camera tool

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