Bug 16305 - NegativeArraySizeException
Summary: NegativeArraySizeException
Status: RESOLVED DUPLICATE of bug 11506
Alias: None
Product: POI
Classification: Unclassified
Component: HDF (show other bugs)
Version: 1.5.1
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-21 19:35 UTC by bldb
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
Problematic word document (25.00 KB, application/octet-stream)
2003-10-21 08:37 UTC, ttilkka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bldb 2003-01-21 19:35:53 UTC
It hapens when I try to open the following file:
www.cin.ufpe.br/~bldb/personar/poi/test.doc

The exception thrown is:
java.lang.NegativeArraySizeException
	at org.apache.poi.hdf.extractor.data.ListTables.createLVL
(ListTables.java:206)
	at org.apache.poi.hdf.extractor.data.ListTables.initLFO
(ListTables.java:184)
	at org.apache.poi.hdf.extractor.data.ListTables.<init>
(ListTables.java:78)
	at org.apache.poi.hdf.extractor.WordDocument.createListTables
(WordDocument.java:1676)
	at org.apache.poi.hdf.extractor.WordDocument.findFormatting
(WordDocument.java:403)
	at org.apache.poi.hdf.extractor.WordDocument.processComplexFile
(WordDocument.java:330)
	at org.apache.poi.hdf.extractor.WordDocument.readFIB
(WordDocument.java:282)
	at org.apache.poi.hdf.extractor.WordDocument.<init>
(WordDocument.java:232)
Comment 1 Avik Sengupta 2003-01-26 20:38:10 UTC
you need to attache the file and the minimum code to reproduce the problem.
Please note however that word file support is far from complete. 
Comment 2 Nitin 2003-05-14 19:46:22 UTC
I experienced the same problem with an excel document. It throws this 
exception while making the HSSFWorkbook object from an excel file.

It happens when the rows of an excel sheet are updated. It occurs usually if 
there is a repeatative data in the cells in different rows. It is weird in the 
sense, updating the rows again with the same data solves the problem.

I removed the other sheets from the excel document which also solved the 
problem.
Comment 3 Danny Mui 2003-05-14 20:04:48 UTC
can you attach the offending sheet and code that caused this problem?  
Comment 4 Andy Oliver 2003-07-24 14:12:34 UTC
information asked for but not provided/ HDF replaced by HWPF
Comment 5 ttilkka 2003-10-21 08:37:29 UTC
Created attachment 8646 [details]
Problematic word document
Comment 6 ttilkka 2003-10-21 08:38:18 UTC
Here is a code fragment that illustrates the bug. The document "test.doc" is 
provided as an attachment.

------------------------------
package bug;

import java.io.IOException;

import org.apache.poi.hdf.extractor.WordDocument;

public class Bug {
    
    public static void main(String args[]) {
        
        try {
            WordDocument wordDoc = new WordDocument("test.doc");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

Comment 7 Ryan Ackley 2003-10-21 11:05:30 UTC

*** This bug has been marked as a duplicate of 11506 ***