[jira] [Updated] (PDFBOX-5835) DomXmpParser - IllegalArgumentException: prefix cannot be "null" when creating a QName
[ https://issues.apache.org/jira/browse/PDFBOX-5835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tilman Hausherr updated PDFBOX-5835: Fix Version/s: 2.0.32 3.0.3 PDFBox 4.0.0 > DomXmpParser - IllegalArgumentException: prefix cannot be "null" when > creating a QName > -- > > Key: PDFBOX-5835 > URL: https://issues.apache.org/jira/browse/PDFBOX-5835 > Project: PDFBox > Issue Type: Bug > Components: XmpBox >Affects Versions: 2.0.31, 3.0.2 PDFBox >Reporter: Oliver Schmidtmer >Priority: Major > Fix For: 2.0.32, 3.0.3 PDFBox, 4.0.0 > > > I've got a PDF from, where parsing the metadata fails with an > IllegalArgumentException > {code:java} > java.lang.IllegalArgumentException: prefix cannot be "null" when creating a > QName > at java.xml/javax.xml.namespace.QName.(QName.java:192) > at org.apache.xmpbox.xml.DomHelper.getQName(DomHelper.java:99) > at > org.apache.xmpbox.xml.DomXmpParser.parseChildrenAsProperties(DomXmpParser.java:306) > at > org.apache.xmpbox.xml.DomXmpParser.parseDescriptionRoot(DomXmpParser.java:250) > at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:201) > at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:112) > {code} > This can be reproduced with a simple test, using the extracted metadata: > {code:java} > @Test > void testDomXmpParser() throws XmpParsingException > { > // taken from file test-landscape2.pdf > String xmpmeta = " standalone=\"no\"?>\n" + > " id=\"W5M0MpCehiHzreSzNTczkc9d\"?> x:xmptk=\"FIS/xee\">\n" + > " xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\";>\n" + > " xmlns:pdfaid=\"http://www.aiim.org/pdfa/ns/id/\";>\n" + > " 3\n" + > " A\n" + > " \n" + > " xmlns:pdfaExtension=\"http://www.aiim.org/pdfa/ns/extension/\"; > xmlns:pdfaField=\"http://www.aiim.org/pdfa/ns/field#\"; > xmlns:pdfaProperty=\"http://www.aiim.org/pdfa/ns/property#\"; > xmlns:pdfaSchema=\"http://www.aiim.org/pdfa/ns/schema#\"; > xmlns:pdfaType=\"http://www.aiim.org/pdfa/ns/type#\"; rdf:about=\"\"/>\n" + > " \n" + > "xmlns=\"http://www.aiim.org/pdfa/ns/extension/\";>\n" + > "\n" + > " \n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/schema#\";>ZUGFeRD PDFA Extension > Schema\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/schema#\";>urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#\n" > + > " xmlns=\"http://www.aiim.org/pdfa/ns/schema#\";>zf\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/schema#\";>\n" + > " \n" + > "\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>DocumentFileName\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>Text\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>external\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>name of the embedded XML > invoice file\n" + > "\n" + > "\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>DocumentType\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>Text\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>external\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>INVOICE\n" + > "\n" + > "\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>Version\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>Text\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>external\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>The actual version of the > ZUGFeRD data\n" + > "\n" + > "\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>ConformanceLevel\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>Text\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>external\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>The conformance level of the > ZUGFeRD data\n" + > "\n" + > " \n" + > " \n" + > " \n" + >
[jira] [Updated] (PDFBOX-5835) DomXmpParser - IllegalArgumentException: prefix cannot be "null" when creating a QName
[ https://issues.apache.org/jira/browse/PDFBOX-5835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tilman Hausherr updated PDFBOX-5835: Affects Version/s: 2.0.31 > DomXmpParser - IllegalArgumentException: prefix cannot be "null" when > creating a QName > -- > > Key: PDFBOX-5835 > URL: https://issues.apache.org/jira/browse/PDFBOX-5835 > Project: PDFBox > Issue Type: Bug > Components: XmpBox >Affects Versions: 2.0.31, 3.0.2 PDFBox >Reporter: Oliver Schmidtmer >Priority: Major > > I've got a PDF from, where parsing the metadata fails with an > IllegalArgumentException > {code:java} > java.lang.IllegalArgumentException: prefix cannot be "null" when creating a > QName > at java.xml/javax.xml.namespace.QName.(QName.java:192) > at org.apache.xmpbox.xml.DomHelper.getQName(DomHelper.java:99) > at > org.apache.xmpbox.xml.DomXmpParser.parseChildrenAsProperties(DomXmpParser.java:306) > at > org.apache.xmpbox.xml.DomXmpParser.parseDescriptionRoot(DomXmpParser.java:250) > at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:201) > at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:112) > {code} > This can be reproduced with a simple test, using the extracted metadata: > {code:java} > @Test > void testDomXmpParser() throws XmpParsingException > { > // taken from file test-landscape2.pdf > String xmpmeta = " standalone=\"no\"?>\n" + > " id=\"W5M0MpCehiHzreSzNTczkc9d\"?> x:xmptk=\"FIS/xee\">\n" + > " xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\";>\n" + > " xmlns:pdfaid=\"http://www.aiim.org/pdfa/ns/id/\";>\n" + > " 3\n" + > " A\n" + > " \n" + > " xmlns:pdfaExtension=\"http://www.aiim.org/pdfa/ns/extension/\"; > xmlns:pdfaField=\"http://www.aiim.org/pdfa/ns/field#\"; > xmlns:pdfaProperty=\"http://www.aiim.org/pdfa/ns/property#\"; > xmlns:pdfaSchema=\"http://www.aiim.org/pdfa/ns/schema#\"; > xmlns:pdfaType=\"http://www.aiim.org/pdfa/ns/type#\"; rdf:about=\"\"/>\n" + > " \n" + > "xmlns=\"http://www.aiim.org/pdfa/ns/extension/\";>\n" + > "\n" + > " \n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/schema#\";>ZUGFeRD PDFA Extension > Schema\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/schema#\";>urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#\n" > + > " xmlns=\"http://www.aiim.org/pdfa/ns/schema#\";>zf\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/schema#\";>\n" + > " \n" + > "\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>DocumentFileName\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>Text\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>external\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>name of the embedded XML > invoice file\n" + > "\n" + > "\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>DocumentType\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>Text\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>external\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>INVOICE\n" + > "\n" + > "\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>Version\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>Text\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>external\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>The actual version of the > ZUGFeRD data\n" + > "\n" + > "\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>ConformanceLevel\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>Text\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>external\n" + > " xmlns=\"http://www.aiim.org/pdfa/ns/property#\";>The conformance level of the > ZUGFeRD data\n" + > "\n" + > " \n" + > " \n" + > " \n" + > "\n" + > " \n" + > " \n" + > " xmlns:zf=\