https://bz.apache.org/bugzilla/show_bug.cgi?id=60160

            Bug ID: 60160
           Summary: ArrayIndexOutOfBoundsException coming when trying to
                    extract text from doc file.
           Product: POI
           Version: 3.15-dev
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: HWPF
          Assignee: dev@poi.apache.org
          Reporter: akki.1...@gmail.com

Code -     
    byte[] bytes = IOUtils.toByteArray(new FileInputStream(file));
    HWPFDocument doc = new HWPFDocument(new ByteArrayInputStream(bytes));
    // using XWPFWordExtractor Class
    System.out.println(doc.getDocumentText());



Exception stack trace - 

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
    at java.lang.System.arraycopy(Native Method)
    at org.apache.poi.hwpf.model.SectionTable.<init>(SectionTable.java:84)
    at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:342)
    at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:186)
    at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:174)
    at com.test.DocExtractor.main(DocExtractor.java:12)

If we can some how ignore this exception we can get other parts of the
document.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

Reply via email to