You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2004/05/04 19:50:24 UTC

DO NOT REPLY [Bug 28772] New: - Excel file causes InvocationTargetException

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28772>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28772

Excel file causes InvocationTargetException

           Summary: Excel file causes InvocationTargetException
           Product: POI
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: HSSF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: dmccon1957@yahoo.com


The attached Excel file , which I believe is generated by Microsoft Access 
causes the following Exception when trying to create a workbook. The POI 
version this was tried with is 2.0 and 2.5 Final 20040302. The code fragment is:
is = new FileInputStream(filepath); // String representing pathname of xls file
POIFSFileSystem fs = new POIFSFileSystem(is);
HSSFWorkbook wb = new HSSFWorkbook(fs);

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>
Caused by: java.lang.ArrayIndexOutOfBoundsException
	at org.apache.poi.util.LittleEndian.getNumber(LittleEndian.java:491)
	at org.apache.poi.util.LittleEndian.getInt(LittleEndian.java:139)
	at org.apache.poi.hssf.record.BOFRecord.fillFields(BOFRecord.java:133)
	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.BOFRecord.<init>(BOFRecord.java:98)

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org