[
https://issues.apache.org/jira/browse/PDFBOX-3060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14978837#comment-14978837
]
Tilman Hausherr commented on PDFBOX-3060:
-----------------------------------------
This avoids ClassCastException that happened with (broken) file 262200.pdf
{code}
Exception in thread "main" java.lang.ClassCastException:
org.apache.pdfbox.cos.COSNull cannot be cast to
org.apache.pdfbox.cos.COSDictionary
at
org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:200)
at
org.apache.pdfbox.preflight.parser.PreflightParser.initialParse(PreflightParser.java:265)
{code}
> Catalog cannot be found
> -----------------------
>
> Key: PDFBOX-3060
> URL: https://issues.apache.org/jira/browse/PDFBOX-3060
> Project: PDFBox
> Issue Type: Sub-task
> Components: Parsing
> Affects Versions: 1.8.10, 2.0.0
> Reporter: Andreas Lehmkühler
> Assignee: Andreas Lehmkühler
> Fix For: 1.8.11, 2.0.0
>
> Attachments: SMVKUOVVJKOCAFNYI6KV5TPG7SZ324YG.pdf
>
>
> There are several files producing the same exception within the TIKA test
> arena:
> {code}
> Caused by: java.io.IOException: Catalog cannot be found
> org.apache.pdfbox.cos.COSDocument.getCatalog(COSDocument.java:363)
> org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:200)
> org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:230)
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:854)
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:797)
>
> org.apache.pdfbox.debugger.PDFDebugger.parseDocument(PDFDebugger.java:1216)
> org.apache.pdfbox.debugger.PDFDebugger.readPDFFile(PDFDebugger.java:1144)
> org.apache.pdfbox.debugger.PDFDebugger.readPDFFile(PDFDebugger.java:1129)
> org.apache.pdfbox.debugger.PDFDebugger.access$13(PDFDebugger.java:1126)
>
> org.apache.pdfbox.debugger.PDFDebugger$11.actionPerformed(PDFDebugger.java:1230)
> java.security.AccessController.doPrivileged(Native Method)
>
> java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
>
> java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
> java.security.AccessController.doPrivileged(Native Method)
>
> java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
> {code}
> 1.8.10 (non sequential parser only) and 2.0.0 are producing the same
> exception.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]