Bug 24088 - Fail to open the file
Summary: Fail to open the file
Status: RESOLVED WORKSFORME
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 1.5.1
Hardware: PC All
: P3 critical (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-24 08:24 UTC by Ambrose Wong
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ambrose Wong 2003-10-24 08:24:06 UTC
POIFSFileSystem fs      =
					new POIFSFileSystem(new FileInputStream
("C:\\Projects\\KPM\\POI Test\\xls\\report_card.xls"));
	
			HSSFWorkbook wb = new HSSFWorkbook(fs);

java.lang.NegativeArraySizeException
	at org.apache.poi.hssf.record.SSTDeserializer.readStringRemainder
(SSTDeserializer.java:335)
	at org.apache.poi.hssf.record.SSTDeserializer.processContinueRecord
(SSTDeserializer.java:320)
	at org.apache.poi.hssf.record.SSTRecord.processContinueRecord
(SSTRecord.java:539)
	at org.apache.poi.hssf.record.RecordFactory.createRecords
(RecordFactory.java:216)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>
(HSSFWorkbook.java:181)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>
(HSSFWorkbook.java:153)
	at TestReadWriteSample.main(TestReadWriteSample.java:28)

The SSTDeserializer's status before the error happened
charCount=122
coninuationExpectedChars=-12
extendedText=true
extensionLength=16
richText=true
runCount=2
unfinishedString="........year:Y   m     \f "
wideChar=true

record=byte[2452]
stringRemainderSizeInBytes=-24
Comment 1 Ambrose Wong 2003-10-24 08:34:40 UTC
POIFSFileSystem fs      =
					new POIFSFileSystem(new FileInputStream
("C:\\Projects\\KPM\\POI Test\\xls\\report_card.xls"));
	
			HSSFWorkbook wb = new HSSFWorkbook(fs);

java.lang.NegativeArraySizeException
	at org.apache.poi.hssf.record.SSTDeserializer.readStringRemainder
(SSTDeserializer.java:335)
	at org.apache.poi.hssf.record.SSTDeserializer.processContinueRecord
(SSTDeserializer.java:320)
	at org.apache.poi.hssf.record.SSTRecord.processContinueRecord
(SSTRecord.java:539)
	at org.apache.poi.hssf.record.RecordFactory.createRecords
(RecordFactory.java:216)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>
(HSSFWorkbook.java:181)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>
(HSSFWorkbook.java:153)
	at TestReadWriteSample.main(TestReadWriteSample.java:28)

The SSTDeserializer's status before the error happened
charCount=122
coninuationExpectedChars=-12
extendedText=true
extensionLength=16
richText=true
runCount=2
unfinishedString="........year:Y   m     \f "
wideChar=true

record=byte[2452]
stringRemainderSizeInBytes=-24
Comment 2 Jason Height 2003-10-26 22:19:05 UTC
This bug has been resolved in CVS head.

Could you build POI from CVS and check that your problem has been resolved.

Jason