poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30772] New: - ArrayIndexOutOfBoundsException when creating HSSFWorkbook object for very large XLS file
Date Fri, 20 Aug 2004 12:20:30 GMT
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=30772>.
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=30772

ArrayIndexOutOfBoundsException when creating HSSFWorkbook object for very large XLS file

           Summary: ArrayIndexOutOfBoundsException when creating
                    HSSFWorkbook object for very large XLS file
           Product: POI
           Version: 2.5
          Platform: All
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: Other
         Component: HSSF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: marco.miljak@web.de


I've tried to read in a very large XLS file with 10 sheets and with a big bunch 
of data on every sheet. When creating the HSSFWorkbook object for that file I 
get an ArrayIndexOutOfBounds exception (code below).

java.lang.reflect.InvocationTargetException: 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)
	at java.lang.reflect.Constructor.newInstance(Native Method)
	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:163)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:130)
	at POI1.main(POI1.java:23)
org.apache.poi.hssf.record.RecordFormatException: Unable to construct record 
instance, the following exception occured: null
	at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:
237)
	at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:
160)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:163)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:130)
	at POI1.main(POI1.java:23)
Exception in thread "main" 

The code I used was:

POIFSFileSystem fs = new POIFSFileSystem( new FileInputStream(args[0] ) );	
HSSFWorkbook wb = new HSSFWorkbook( fs ); // Exception here!!!

To confirm that bug I tried a smaller XLS file and it worked fine. Maybe it's
because of the heavy use of 'short' symbols in POI.

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


Mime
View raw message