[
https://issues.apache.org/jira/browse/PDFBOX-4325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17908926#comment-17908926
]
Tilman Hausherr edited comment on PDFBOX-4325 at 12/16/25 4:12 PM:
-------------------------------------------------------------------
The main bug was fixed in 2.0.12. -The follow-up bug should be worked in
PDFBOX-5292 or other issues with the same problem.- Follow-up in PDFBOX-6126
(although it's also an extension schema)
was (Author: tilman):
The main bug was fixed in 2.0.12. -The follow-up bug should be worked in
PDFBOX-5292 or other issues with the same problem.- Follow-up in PDFBOX-6126
(although it's also a PDF extension schema)
> Validation fails with ClassCastException
> ----------------------------------------
>
> Key: PDFBOX-4325
> URL: https://issues.apache.org/jira/browse/PDFBOX-4325
> Project: PDFBox
> Issue Type: Bug
> Components: Preflight, XmpBox
> Affects Versions: 2.0.11
> Reporter: Alonso Gonzalez
> Assignee: Tilman Hausherr
> Priority: Major
> Fix For: 2.0.12, 3.0.0 PDFBox
>
> Attachments: CreatePdf.java, pdfa1b-itext.pdf
>
>
> We have to validate PDFs that were created using iText5. But the validation
> fails with a ClassCastException:
> {noformat}
> Exception in thread "main" java.lang.ClassCastException: class
> org.apache.xmpbox.type.PDFAPropertyType
> at java.lang.Class.asSubclass(Class.java:3404)
> at
> org.apache.xmpbox.type.TypeMapping.instanciateSimpleProperty(TypeMapping.java:180)
> at
> org.apache.xmpbox.xml.DomXmpParser.parseLiElement(DomXmpParser.java:521)
> at
> org.apache.xmpbox.xml.DomXmpParser.parseLiDescription(DomXmpParser.java:603)
> at
> org.apache.xmpbox.xml.DomXmpParser.parseLiElement(DomXmpParser.java:514)
> at org.apache.xmpbox.xml.DomXmpParser.manageArray(DomXmpParser.java:465)
> at
> org.apache.xmpbox.xml.DomXmpParser.createProperty(DomXmpParser.java:344)
> at
> org.apache.xmpbox.xml.DomXmpParser.parseChildrenAsProperties(DomXmpParser.java:311)
> at
> org.apache.xmpbox.xml.DomXmpParser.parseDescriptionRoot(DomXmpParser.java:240)
> at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:192)
> at
> org.apache.pdfbox.preflight.process.MetadataValidationProcess.validate(MetadataValidationProcess.java:69)
> at
> org.apache.pdfbox.preflight.utils.ContextHelper.callValidation(ContextHelper.java:84)
> at
> org.apache.pdfbox.preflight.utils.ContextHelper.validateElement(ContextHelper.java:122)
> at
> org.apache.pdfbox.preflight.PreflightDocument.validate(PreflightDocument.java:166)
> at Main.main(Main.java:40)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
> {noformat}
> I've attached a minimal example PDF that triggers the error.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]