Bug 32822

Summary: Error opening XL file with InputStream
Product: POI Reporter: password <bvasanth123>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P1    
Version: 2.5-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Attachments: XL File that gives error

Description password 2004-12-23 08:27:58 UTC
I am getting error while opening xl file. Here is my code
FileInputStream inputStream  = new FileInputStream("c:\\TEST1.xls");
HSSFWorkbook workbook = new HSSFWorkbook(inputStream);

and ehere is exception I get 
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:274)
	at org.apache.poi.hssf.record.RecordFactory.createRecord
(RecordFactory.java:224)
	at org.apache.poi.hssf.record.RecordFactory.createRecords
(RecordFactory.java:160)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>
(HSSFWorkbook.java:165)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>
(HSSFWorkbook.java:212)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>
(HSSFWorkbook.java:193)
	at com.dreyfus.client.ExcelClient.go2(ExcelClient.java:23)
	at com.dreyfus.client.ExcelClient.main(ExcelClient.java:18)
Caused by: java.lang.ArrayIndexOutOfBoundsException
	at java.lang.System.arraycopy(Native Method)
	at org.apache.poi.hssf.record.UnknownRecord.<init>
(UnknownRecord.java:62)
	at org.apache.poi.hssf.record.SubRecord.createSubRecord
(SubRecord.java:57)
	at org.apache.poi.hssf.record.ObjRecord.fillFields(ObjRecord.java:99)
	at org.apache.poi.hssf.record.Record.fillFields(Record.java:90)
	at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
	at org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:61)
	... 11 more
Error org.apache.poi.hssf.record.RecordFormatException: Unable to construct 
record instance, the following exception occured: null
Comment 1 password 2004-12-23 08:29:07 UTC
Created attachment 13829 [details]
XL File that gives error

This is the xl file that gives me error
Comment 2 password 2004-12-23 08:30:08 UTC
I had attached the xls file that gives error
Comment 3 Avik Sengupta 2005-04-22 11:41:05 UTC
This excel sheet works fine with CVS HEAD as of 22Apr2005. Added file as a
testcase (in o.a.p.hssf.usermodel.TestBugs) to prevent future regression