There may be some issue with opening the ListLevel structures. Unfortunately we can't give you a test document for this one. Needless to say it eliminates the ability to read any text from the document. It would be good if at the very least, the things which are valid would still be read out. java.lang.ArrayIndexOutOfBoundsException: 36251 at org.apache.poi.util.LittleEndian.getNumber(LittleEndian.java:491) at org.apache.poi.util.LittleEndian.getShort(LittleEndian.java:52) at org.apache.poi.hwpf.model.ListLevel.<init>(ListLevel.java:123) at org.apache.poi.hwpf.model.ListFormatOverrideLevel.<init>(ListFormatOverrideLevel.java:49) at org.apache.poi.hwpf.model.ListTables.<init>(ListTables.java:85) at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:185)
Same situation for me with 3.5 beta 4 Caused by: java.lang.ArrayIndexOutOfBoundsException: 593194 at org.apache.poi.util.LittleEndian.getShort(LittleEndian.java:45) at org.apache.poi.hwpf.model.ListLevel.<init>(ListLevel.java:120) at org.apache.poi.hwpf.model.ListFormatOverrideLevel.<init>(ListFormatOverrideLevel.java:50) at org.apache.poi.hwpf.model.ListTables.<init>(ListTables.java:89) at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:269) at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:158) at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:146)
I have the say problem on trunk (july 2009): Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 130936 at org.apache.poi.util.LittleEndian.getShort(LittleEndian.java:46) at org.apache.poi.hwpf.model.ListLevel.<init>(ListLevel.java:120) at org.apache.poi.hwpf.model.ListFormatOverrideLevel.<init>(ListFormatOverrideLevel.java:48) at org.apache.poi.hwpf.model.ListTables.<init>(ListTables.java:88) at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:268) at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:157) at org.apache.poi.hwpf.extractor.WordExtractor.<init>(WordExtractor.java:62) at org.apache.poi.hwpf.extractor.WordExtractor.<init>(WordExtractor.java:54) at org.apache.poi.hwpf.extractor.WordExtractor.main(WordExtractor.java:92) Unfortunately I can't give you a test document
Does this problem still remain with a recent svn nightly build / poi 3.8 beta 1 (when released shortly...)?
Let's assume that it is. We don't have a copy of a file which exhibits the issue and I can't get any sample data from the source either.
I still have document that raises the same exception. Unfortunatelly, it has clear statement about restricted distribution and I can't attach it to bug report.
Fair enough. Reopening, as I'm sure it will affect us eventually too.
I have document which raises the same exception. This document available at <a href="http://easyimpress.com/files/english.doc"/>
Confirmed that we still have the problem in trunk (as of r1138799). Yegor (In reply to comment #7) > I have document which raises the same exception. This document available at <a > href="http://easyimpress.com/files/english.doc"/>
File not found at specified location.
(In reply to comment #9) > File not found at specified location. Sorry for that. Now that document available at http://67.23.29.23/english.doc Thank you, Vladimir
Seems to be fixed as part of 53380
I have a same problem. when i read a document of doc. this my poi dependency. <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>4.1.2</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>4.1.2</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml-schemas</artifactId> <version>4.1.2</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-scratchpad</artifactId> <version>4.1.2</version> </dependency> my code InputStream is = new FileInputStream(path); HWPFDocument doc = new HWPFDocument(is); StringBuilder buffer = doc.getText(); the error java.lang.ArrayIndexOutOfBoundsException: Index 65946 out of bounds for length 9355 at org.apache.poi.util.LittleEndian.getUShort(LittleEndian.java:355) at org.apache.poi.hwpf.model.FileInformationBlock.<init>(FileInformationBlock.java:118) at org.apache.poi.hwpf.HWPFDocumentCore.<init>(HWPFDocumentCore.java:170)