[
https://issues.apache.org/jira/browse/PDFBOX-1642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14558297#comment-14558297
]
Petras edited comment on PDFBOX-1642 at 5/25/15 2:48 PM:
---------------------------------------------------------
Sorry for being late to test whether this issue was resolved. We recently
updated PDFBox to latest stable version v1.8.9 and I reenabled disabled test
case on this issue. Unfortunatelly, this issue is still present, though I get
NPE on "close Choice of Text" in another place, when reading PDF/A file
containing schema definition and values in it's catalog /Metadata key, which I
try to parse:
{code}
java.lang.NullPointerException
at
org.apache.xmpbox.xml.PdfaExtensionHelper.populateSchemaMapping(PdfaExtensionHelper.java:219)
at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:195)
at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:106)
...
{code}
The method {{populateSchemaMapping()}} does not consider that {{valueType}}
element ("{{http://www.aiim.org/pdfa/ns/property#}}" namespace) in schema can
be specified with type "close Choice of Text".
was (Author: abyss):
Sorry for being late to test whether this issue was resolved. We recently
updated PDFBox to latest stable version v1.8.9 and I reenabled disabled test
case on this issue. Unfortunatelly, this issue is still present, though I get
NPE on "close Choice of Text" in another place:
{code}
java.lang.NullPointerException
at
org.apache.xmpbox.xml.PdfaExtensionHelper.populateSchemaMapping(PdfaExtensionHelper.java:219)
at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:195)
at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:106)
...
{code}
> NPE when parsing XMP schema definition with "closed Choice" value type
> ----------------------------------------------------------------------
>
> Key: PDFBOX-1642
> URL: https://issues.apache.org/jira/browse/PDFBOX-1642
> Project: PDFBox
> Issue Type: Bug
> Components: Preflight, XmpBox
> Affects Versions: 1.8.2
> Reporter: Petras
> Assignee: Guillaume Bailleul
> Attachments: metadata_with_schema.zip
>
>
> If PDF/A file includes custom metadata and its extension schema description
> containing the type "closed Choice of Text", PDF/A validation using Preflight
> fails with NPE. The extract from stack trace:
> java.lang.NullPointerException
> at
> org.apache.xmpbox.xml.PdfaExtensionHelper.populateSchemaMapping(PdfaExtensionHelper.java:214)
> at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:193)
> at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:106)
> at
> org.apache.pdfbox.preflight.process.MetadataValidationProcess.validate(MetadataValidationProcess.java:66)
> at
> org.apache.pdfbox.preflight.utils.ContextHelper.callValidation(ContextHelper.java:74)
> at
> org.apache.pdfbox.preflight.utils.ContextHelper.validateElement(ContextHelper.java:88)
> at
> org.apache.pdfbox.preflight.PreflightDocument.validate(PreflightDocument.java:168)
> ...
> It appears, that
> org.apache.xmpbox.xml.PdfaExtensionHelper#transformValueType() method does
> not consider "closed" or "open" directives for "Choice" value type in
> property definition.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]