[ https://issues.apache.org/jira/browse/TIKA-2109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Allison updated TIKA-2109: ------------------------------ Labels: sax_docx_fixes (was: ) > OutOfMemory when parsing 5MB word document > ------------------------------------------ > > Key: TIKA-2109 > URL: https://issues.apache.org/jira/browse/TIKA-2109 > Project: Tika > Issue Type: Bug > Affects Versions: 1.13 > Environment: openjdk version "1.8.0_91" > OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~14.04-b14) > OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode) > Reporter: Julian > Labels: sax_docx_fixes > Fix For: 2.0, 1.15 > > Attachments: zafar-bug-9.docx > > > When I run the following command to extract text from the attached 5MB word > document, I get the OOM error below. > java -jar tika-app-1.13.jar --text '/vagrant/zafar-bug-9.docx' > The problem goes away if I set -Xms2G -Xmx2G, but I'm reluctant to specify > such a high setting for my use case for what seems like a small file? Also I > don't see this error with other files of similar size. > Exception in thread "main" java.lang.OutOfMemoryError: Java heap space > at > com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl.getNodeObject(DeferredDocumentImpl.java:972) > at > com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl.synchronizeData(DeferredElementNSImpl.java:126) > at > com.sun.org.apache.xerces.internal.dom.ElementNSImpl.getNamespaceURI(ElementNSImpl.java:250) > at org.apache.xmlbeans.impl.store.Locale.loadNode(Locale.java:1420) > at > org.apache.xmlbeans.impl.store.Locale.loadNodeChildren(Locale.java:1403) > at org.apache.xmlbeans.impl.store.Locale.loadNode(Locale.java:1445) > at > org.apache.xmlbeans.impl.store.Locale.loadNodeChildren(Locale.java:1403) > at org.apache.xmlbeans.impl.store.Locale.loadNode(Locale.java:1445) > at > org.apache.xmlbeans.impl.store.Locale.loadNodeChildren(Locale.java:1403) > at org.apache.xmlbeans.impl.store.Locale.loadNode(Locale.java:1445) > at > org.apache.xmlbeans.impl.store.Locale.loadNodeChildren(Locale.java:1403) > at org.apache.xmlbeans.impl.store.Locale.loadNode(Locale.java:1445) > at > org.apache.xmlbeans.impl.store.Locale.loadNodeChildren(Locale.java:1403) > at org.apache.xmlbeans.impl.store.Locale.loadNode(Locale.java:1445) > at > org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1385) > at > org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1370) > at > org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:370) > at org.apache.poi.POIXMLTypeLoader.parse(POIXMLTypeLoader.java:117) > at > org.openxmlformats.schemas.wordprocessingml.x2006.main.DocumentDocument$Factory.parse(Unknown > Source) > at > org.apache.poi.xwpf.usermodel.XWPFDocument.onDocumentRead(XWPFDocument.java:164) > at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:160) > at > org.apache.poi.xwpf.usermodel.XWPFDocument.<init>(XWPFDocument.java:124) > at > org.apache.poi.xwpf.extractor.XWPFWordExtractor.<init>(XWPFWordExtractor.java:58) > at > org.apache.poi.extractor.ExtractorFactory.createExtractor(ExtractorFactory.java:237) > at > org.apache.tika.parser.microsoft.ooxml.OOXMLExtractorFactory.parse(OOXMLExtractorFactory.java:86) > at > org.apache.tika.parser.microsoft.ooxml.OOXMLParser.parse(OOXMLParser.java:87) > at > org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280) > at > org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280) > at > org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120) > at org.apache.tika.cli.TikaCLI$OutputType.process(TikaCLI.java:191) > at org.apache.tika.cli.TikaCLI.process(TikaCLI.java:480) > at org.apache.tika.cli.TikaCLI.main(TikaCLI.java:145) -- This message was sent by Atlassian JIRA (v6.4.14#64029)