You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Tim Allison (Jira)" <ji...@apache.org> on 2025/07/10 13:18:00 UTC
[jira] [Resolved] (TIKA-4453) ForkParser fails on documents with more than 100 embedded documents
[ https://issues.apache.org/jira/browse/TIKA-4453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Allison resolved TIKA-4453.
-------------------------------
Fix Version/s: 4.0.0
3.2.2
Resolution: Fixed
> ForkParser fails on documents with more than 100 embedded documents
> -------------------------------------------------------------------
>
> Key: TIKA-4453
> URL: https://issues.apache.org/jira/browse/TIKA-4453
> Project: Tika
> Issue Type: Bug
> Components: core
> Affects Versions: 3.2.1
> Reporter: Stephen H
> Priority: Minor
> Fix For: 4.0.0, 3.2.2
>
> Attachments: forkparser-patch.txt
>
>
> ForkParser uses RecursiveMetadataContentHandlerProxy, which overrides endEmbeddedDocument() but does not call the superclass method. Because of this, the embeddedDepth in AbstractRecursiveParserWrapperHandler gets incremented with each new embedded document but never decremented. Once it hits 100 embedded documents and the maximum depth a SAXException is thrown by AbstractRecursiveParserWrapperHandler startEmbeddedDocument().
> The attached patch adds a new method to AbstractRecursiveParserWrapperHandler to decrement the depth which is called by RecursiveMetadataContentHandlerProxy endEmbeddedDocument(). There is a new ForkParser test for a document with 110 embedded documents.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)