Excel has a nifty feature called "validation" whereby it allows you to specify a list of possible values for a column and it will use the list to populate a drop-down list when a cell that uses that format has been highlighted (i.e. cursor is on it). There is an incompatibility between the latest version of POI/HSSFS and this feature. It fails every-time without fail. Here are the exact steps to reproduce: 1. Create a spreadsheet using the validation feature I spoke about (or use the one that have/will uploaded to the bug). 2. Position your cursor overtop of the validation cell (highligh it) so as to cause the selector to appear. 3. SAVE the workbook! Its important to save the workbook with the cursor overtop of this cell. 4. Now read the workbook with POI/HSSF. You will see a stacktrace comparable to the following: 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:132) at com.dorado.app.ppe.service.client.shell.lib.excel.PMExcelToDif.getBook (PMExcelToDif.java:406) at com.dorado.app.ppe.service.client.shell.lib.excel.PMExcelToDif.parseBook (PMExcelToDif.java:93) at com.dorado.app.ppe.service.client.shell.lib.excel.PMExcelToDif.main (PMExcelToDif.java:429) at com.dorado.app.ppe.service.client.shell.PMShell.main(PMShell.java:79) 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) ... 16 more com.dorado.app.ppe.service.client.shell.lib.excel.WorkbookNotFoundException: Fatal: Workbook "C:\dummy.xls" not found or invalid. at com.dorado.app.ppe.service.client.shell.lib.excel.PMExcelToDif.getBook (PMExcelToDif.java:411) ... etc.
Created attachment 11940 [details] sample spreadsheet that crashes POI/HSSF
Works for me with latest CVS version. Jason
(In reply to comment #2) > Works for me with latest CVS version. > > Jason > Since the latest binary distribution (2.5.1-final) DOES have the problem, is there a patch that can be applied to fix this problem? It's been a while since there was an official release... Rob