You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by "Leimbach, Johannes" <JL...@CONET.DE> on 2006/07/28 11:50:30 UTC

Bugreport: Reading a special DOC file triggers a NullPointerException

Hello,

 

I think I've found a bug in the lastest PIO word file reader. 

 

I try to read a Word document:

- Title "Überblick über Open Source und DMS"

- Author: "Heßler"

- Num pages: 10

- Contains some tables and some graphics

- DOT is "Studie.dot"

- Filesize 116 kb

 

The stacktrace I receive: 

java.lang.NullPointerException

      at org.apache.poi.hdf.extractor.WordDocument.printTable(WordDocument.java:1790)

      at org.apache.poi.hdf.extractor.WordDocument.createParagraph(WordDocument.java:932)

      at org.apache.poi.hdf.extractor.WordDocument.addBlockContent(WordDocument.java:876)

      at org.apache.poi.hdf.extractor.WordDocument.writeSection(WordDocument.java:681)

      at org.apache.poi.hdf.extractor.WordDocument.<init>(WordDocument.java:211)

      at fulltext.common.poi.MsWordFileWrapper.<init>(MsWordFileWrapper.java:33)

      at fulltext.common.processing.parsers.MsWordFileParser.processFile(MsWordFileParser.java:55)

      at unitTests.processing.parsers.MsWordFileParserTest.testProblematicDocWorks(MsWordFileParserTest.java:89)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:585)

      at junit.framework.TestCase.runTest(TestCase.java:154)

      at junit.framework.TestCase.runBare(TestCase.java:127)

      at junit.framework.TestResult$1.protect(TestResult.java:106)

      at junit.framework.TestResult.runProtected(TestResult.java:124)

      at junit.framework.TestResult.run(TestResult.java:109)

      at junit.framework.TestCase.run(TestCase.java:118)

      at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)

      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)

      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)

      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)

      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

 

 

I would love to upload the file somewhere, so you can verify the bug. Unfortunately I'm not sure if the document may be distributed - I'll check this out.

 

Is the information I provided helpful to fix/resolve this issue? I'd be glad to be of further assistance.

Bye,

Johannes

 

 


Re: Bugreport: Reading a special DOC file triggers a NullPointerException

Posted by Nick Burch <ni...@torchbox.com>.
On Fri, 28 Jul 2006, Leimbach, Johannes wrote:
> I think I've found a bug in the lastest PIO word file reader.

Try using hwpf rather than hdf to read your word files - you might well 
have more luck with it

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/