You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2014/10/31 09:31:33 UTC
[jira] [Commented] (PDFBOX-2465) NPE in
PdfaExtensionHelper.populateSchemaMapping
[ https://issues.apache.org/jira/browse/PDFBOX-2465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14191586#comment-14191586 ]
Tilman Hausherr commented on PDFBOX-2465:
-----------------------------------------
[~hauser@acm.org] what do you get when you check this file with your preflight tools? I'm interested in XMP related errors. The exception above appears to be easy to fix (add a null check) but I wonder if that is the correct thing to do, i.e. if I should throw an exception instead, because of the missing <pdfaSchema:property>.
{code}
<rdf:li rdf:parseType="Resource">
<pdfaSchema:namespaceURI>http://ns.adobe.com/pdf/1.3/</pdfaSchema:namespaceURI>
<pdfaSchema:prefix>pdf</pdfaSchema:prefix>
<pdfaSchema:schema>Adobe PDF Schema</pdfaSchema:schema>
</rdf:li>
{code}
> NPE in PdfaExtensionHelper.populateSchemaMapping
> ------------------------------------------------
>
> Key: PDFBOX-2465
> URL: https://issues.apache.org/jira/browse/PDFBOX-2465
> Project: PDFBox
> Issue Type: Bug
> Components: XmpBox
> Affects Versions: 2.0.0
> Reporter: Tilman Hausherr
> Attachments: example_013.pdf, example_026.pdf, example_030.pdf
>
>
> I get this exception by running preflight on the attached files:
> {code}
> java.lang.NullPointerException
> at org.apache.xmpbox.xml.PdfaExtensionHelper.populateSchemaMapping(PdfaExtensionHelper.java:198)
> at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:202)
> at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:114)
> at org.apache.pdfbox.preflight.process.MetadataValidationProcess.validate(MetadataValidationProcess.java:67)
> at org.apache.pdfbox.preflight.utils.ContextHelper.callValidation(ContextHelper.java:73)
> at org.apache.pdfbox.preflight.utils.ContextHelper.validateElement(ContextHelper.java:88)
> at org.apache.pdfbox.preflight.PreflightDocument.validate(PreflightDocument.java:168)
> at org.apache.pdfbox.util.TestPDFToImage.doTestFile(TestPDFToImage.java:337)
> at org.apache.pdfbox.util.TestPDFToImage.testRenderImage(TestPDFToImage.java:382)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at junit.framework.TestCase.runTest(TestCase.java:176)
> at junit.framework.TestCase.runBare(TestCase.java:141)
> at junit.framework.TestResult$1.protect(TestResult.java:122)
> at junit.framework.TestResult.runProtected(TestResult.java:142)
> at junit.framework.TestResult.run(TestResult.java:125)
> at junit.framework.TestCase.run(TestCase.java:129)
> at junit.framework.TestSuite.runTest(TestSuite.java:255)
> at junit.framework.TestSuite.run(TestSuite.java:250)
> at junit.textui.TestRunner.doRun(TestRunner.java:116)
> at junit.textui.TestRunner.start(TestRunner.java:183)
> at junit.textui.TestRunner.main(TestRunner.java:137)
> at org.apache.pdfbox.util.TestPDFToImage.main(TestPDFToImage.java:432)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)