http://issues.apache.org/bugzilla/show_bug.cgi?id=44501
Summary: ArrayIndexOutOfBoundsException when extracting text from
Visio Files on Linux.
Product: POI
Version: 3.0-dev
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: POI Overall
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
Created an attachment (id=21595)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=21595)
zip file containing 3 Visio files which produced the error
I'm working on Linux and trying to extract text from visio files with
VisioTextExtractor. A sample of the code I've written to do this is below.
protected static String extractVSD(String filename){
try {
FileInputStream fin = new FileInputStream(filename);
VisioTextExtractor extractor = new VisioTextExtractor(fin);
.
.
.
}
When it goes to open a new VisioTextExtractor, I get the following error. This
error occurs for every VSD file that I have tried. I'm using POI scratchpad
version 3.0.2, but I've also tried version 3.0.1 and encountered the same
error. I've attached a zip file containing 3 of the simple test files that
produced the error.
Stacktrace:
java.lang.ArrayIndexOutOfBoundsException: 1991
at org.apache.poi.util.LittleEndian.getNumber(LittleEndian.java:492)
at org.apache.poi.util.LittleEndian.getUInt(LittleEndian.java:164)
at
org.apache.poi.hdgf.chunks.ChunkHeader.createChunkHeader(ChunkHeader.java:43)
at
org.apache.poi.hdgf.chunks.ChunkFactory.createChunk(ChunkFactory.java:108)
at
org.apache.poi.hdgf.streams.ChunkStream.findChunks(ChunkStream.java:54)
at
org.apache.poi.hdgf.streams.PointerContainingStream.findChildren(PointerContainingStream.java:92)
at
org.apache.poi.hdgf.streams.PointerContainingStream.findChildren(PointerContainingStream.java:99)
at
org.apache.poi.hdgf.streams.PointerContainingStream.findChildren(PointerContainingStream.java:99)
at org.apache.poi.hdgf.HDGFDiagram.<init>(HDGFDiagram.java:92)
at
org.apache.poi.hdgf.extractor.VisioTextExtractor.<init>(VisioTextExtractor.java:46)
at
org.apache.poi.hdgf.extractor.VisioTextExtractor.<init>(VisioTextExtractor.java:50)
at
com.lmco.atl.soser.collector.FileContentsUtil.extractVSD(FileContentsUtil.java:298)
at
com.lmco.atl.soser.collector.FileContentsUtil.main(FileContentsUtil.java:442)
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]