You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2013/04/23 11:19:19 UTC

[Bug 54877] New: ArrayIndexOutOfBoundsException when try to read ms doc

https://issues.apache.org/bugzilla/show_bug.cgi?id=54877

            Bug ID: 54877
           Summary: ArrayIndexOutOfBoundsException when try to read ms doc
           Product: POI
           Version: 4.0-dev
          Hardware: PC
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: HWPF
          Assignee: dev@poi.apache.org
          Reporter: swku2801@gmail.com
    Classification: Unclassified

Created attachment 30222
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30222&action=edit
Java file to test POI

Hi,

I doing some testing with both POI 3.9 and POI-4.0-beta1-20130403 to read and
write to ms doc (.doc). But there is a problem when trying to read back the
.doc file which being written with POI,
java.lang.ArrayIndexOutOfBoundsException: 12
    at org.apache.poi.util.LittleEndian.getShort(LittleEndian.java:224)
    at
org.apache.poi.hwpf.model.types.FibBaseAbstractType.fillFields(FibBaseAbstractType.java:96)
    at org.apache.poi.hwpf.model.FibBase.<init>(FibBase.java:43)
    at
org.apache.poi.hwpf.model.FileInformationBlock.<init>(FileInformationBlock.java:71)
    at org.apache.poi.hwpf.HWPFDocumentCore.<init>(HWPFDocumentCore.java:155)
    at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:218)
    at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:186)
    at wordwriter.POI_Tester.readMyDocument(POI_Tester.java:100)
done
    at wordwriter.POI_Tester.readDoc(POI_Tester.java:78)
    at wordwriter.POI_Tester.main(POI_Tester.java:63)

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

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


[Bug 54877] ArrayIndexOutOfBoundsException when try to read ms doc

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54877

--- Comment #1 from celine <sw...@gmail.com> ---
Created attachment 30223
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30223&action=edit
the word document

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

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


[Bug 54877] ArrayIndexOutOfBoundsException when try to read ms doc

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54877

sasrar87@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #2 from sasrar87@gmail.com ---
I just tried this code on my machine and I got the same result:
ArrayIndexOutOfBoundsException.

However, reading from a Word document that was not written to by a Java program
using the POI library works without any exceptions popping up. 

However, I keep seeing that I get two "end of line" characters whenever the
program parses text from a word document. Is this a bug? Is it normal for there
to be two end of line characters at the end of a doc file?

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

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


[Bug 54877] ArrayIndexOutOfBoundsException when try to read ms doc

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54877

mas <ma...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mastropos@gmail.com

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

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