Return-Path: Delivered-To: apmail-poi-dev-archive@www.apache.org Received: (qmail 24838 invoked from network); 17 Jun 2008 21:47:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Jun 2008 21:47:28 -0000 Received: (qmail 30082 invoked by uid 500); 17 Jun 2008 21:47:30 -0000 Delivered-To: apmail-poi-dev-archive@poi.apache.org Received: (qmail 30051 invoked by uid 500); 17 Jun 2008 21:47:29 -0000 Mailing-List: contact dev-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Developers List" Delivered-To: mailing list dev@poi.apache.org Received: (qmail 30040 invoked by uid 99); 17 Jun 2008 21:47:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2008 14:47:29 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2008 21:46:48 +0000 Received: by brutus.apache.org (Postfix, from userid 33) id D43B3234C146; Tue, 17 Jun 2008 14:47:06 -0700 (PDT) From: bugzilla@apache.org To: dev@poi.apache.org Subject: DO NOT REPLY [Bug 45223] New: NegativeArraySizeException in WordDocument constructor. X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: newchanged X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: POI X-Bugzilla-Component: HDF X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: maksimov.andrei@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@poi.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 17 Jun 2008 14:47:06 -0700 (PDT) X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=45223 Summary: NegativeArraySizeException in WordDocument constructor. Product: POI Version: 3.0 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: HDF AssignedTo: dev@poi.apache.org ReportedBy: maksimov.andrei@gmail.com DOCParser class: package resumecrawler.utils.parser; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; import java.util.logging.Level; import java.util.logging.Logger; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.poi.hdf.extractor.WordDocument; /** * * @author solaris */ public class DOCParser implements Parser { File file = null; public DOCParser(File f) { file = f; } public DOCParser(String file) { this.file = new File(file); } public void parse(String fieldName, Document doc) { String content = ""; try { WordDocument wd = new WordDocument(file.toString()); StringWriter docTextWriter = new StringWriter(); wd.writeAllText(new PrintWriter(docTextWriter)); docTextWriter.close(); content = docTextWriter.toString(); } catch (IOException ex) { Logger.getLogger(PDFParser.class.getName()).log(Level.SEVERE, null, ex); } doc.add(new Field(fieldName, content, Field.Store.YES, Field.Index.TOKENIZED)); } } Error stack trace: Exception in thread "main" java.lang.NegativeArraySizeException at org.apache.poi.hdf.extractor.data.ListTables.createLVL(ListTables.java:171) at org.apache.poi.hdf.extractor.data.ListTables.initLFO(ListTables.java:149) at org.apache.poi.hdf.extractor.data.ListTables.(ListTables.java:43) at org.apache.poi.hdf.extractor.WordDocument.createListTables(WordDocument.java:1640) at org.apache.poi.hdf.extractor.WordDocument.findFormatting(WordDocument.java:365) at org.apache.poi.hdf.extractor.WordDocument.processComplexFile(WordDocument.java:292) at org.apache.poi.hdf.extractor.WordDocument.readFIB(WordDocument.java:244) at org.apache.poi.hdf.extractor.WordDocument.(WordDocument.java:194) at org.apache.poi.hdf.extractor.WordDocument.(WordDocument.java:183) at resumecrawler.utils.parser.DOCParser.parse(DOCParser.java:37) ....... file.toString() returns something like this: /home/solaris/crawler/StoreDocuments/9cbb0d2ab441c5a900b7e072915ba298.doc -- Configure bugmail: https://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: dev-unsubscribe@poi.apache.org For additional commands, e-mail: dev-help@poi.apache.org