You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Robert Fink (Jira)" <ji...@apache.org> on 2020/09/25 12:08:00 UTC
[jira] [Commented] (PDFBOX-4967) PDImageXObject and
XmpParsingException with a create date
[ https://issues.apache.org/jira/browse/PDFBOX-4967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17202096#comment-17202096 ]
Robert Fink commented on PDFBOX-4967:
-------------------------------------
Is Blocked by PDFBox 2.0.12 and ongoing versions.
> PDImageXObject and XmpParsingException with a create date
> ---------------------------------------------------------
>
> Key: PDFBOX-4967
> URL: https://issues.apache.org/jira/browse/PDFBOX-4967
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing, PDModel, XmpBox
> Affects Versions: 2.0.0
> Environment: Windows 10 (64 Bit), Java 11.0.8, Netbeans 11.2
> Reporter: Robert Fink
> Priority: Major
> Labels: Java11, PDFBox
> Attachments: SampleApplication.java
>
>
> The goal is to add Metadata with a create date to an image within the PDF document.
> It doesn't work with Java 11 starting from PDFBox 2.0.0.
> It does work instead with Java 8 starting from PDFBox 2.0.0 till PDFBox 2.0.11.
> {code:java}
> // Output
> Sep. 25, 2020 11:59:44 VORM. sample.application.SampleApplication retrieveMetadataOfImage
> SCHWERWIEGEND: null
> org.apache.xmpbox.xml.XmpParsingException: Failed to instanciate DateType property with value 2020-09-25T11:59:44+02:00 in xmp:CreateDate
> at org.apache.xmpbox.xml.DomXmpParser.createProperty(DomXmpParser.java:361)
> 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:204)
> at sample.application.SampleApplication.retrieveMetadataOfImage(SampleApplication.java:107)
> at sample.application.SampleApplication.main(SampleApplication.java:69)
> Caused by: java.lang.IllegalArgumentException: Failed to instanciate DateType property with value 2020-09-25T11:59:44+02:00
> at org.apache.xmpbox.type.TypeMapping.instanciateSimpleProperty(TypeMapping.java:204)
> at org.apache.xmpbox.xml.DomXmpParser.manageSimpleType(DomXmpParser.java:424)
> at org.apache.xmpbox.xml.DomXmpParser.createProperty(DomXmpParser.java:348)
> ... 5 more
> Caused by: java.lang.reflect.InvocationTargetException
> at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
> at org.apache.xmpbox.type.TypeMapping.instanciateSimpleProperty(TypeMapping.java:184)
> ... 7 more
> Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
> at org.apache.xmpbox.DateConverter.fromISO8601(DateConverter.java:403)
> at org.apache.xmpbox.DateConverter.toCalendar(DateConverter.java:102)
> at org.apache.xmpbox.type.DateType.isGoodType(DateType.java:98)
> at org.apache.xmpbox.type.DateType.setValue(DateType.java:118)
> at org.apache.xmpbox.type.AbstractSimpleProperty.<init>(AbstractSimpleProperty.java:59)
> at org.apache.xmpbox.type.DateType.<init>(DateType.java:57)
> ... 12 more
> Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
> at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
> at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
> ... 18 more
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org