[jira] [Commented] (XGC-130) NullPointerException in org.apache.xmlgraphics.xmp.XMPHandler.endElement
[ https://issues.apache.org/jira/browse/XGC-130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17558230#comment-17558230 ] Gregor Müller commented on XGC-130: --- Hi Simon, thank you for your reply. I used the example to start. But using the XMP from ZUGFeRD specification. I get the null pointer. So it seems to me, some parts of the XMP can't be processed by fop/xml-graphics. Please run the example fo file to see the bug. Thank you, Gregor [^zugferd.fo] > NullPointerException in org.apache.xmlgraphics.xmp.XMPHandler.endElement > > > Key: XGC-130 > URL: https://issues.apache.org/jira/browse/XGC-130 > Project: XMLGraphicsCommons > Issue Type: Bug > Components: xmp >Affects Versions: 2.7 >Reporter: Gregor Müller >Priority: Major > Attachments: zugferd-1.fo, zugferd.fo > > > Hi there, > when using XMP metadata for formatting objects I get a null pointer from the > org.apache.xmlgraphics.xmp.XMPHandler class. > I also opened a ticket in fop > (https://issues.apache.org/jira/browse/FOP-3076) But it seems the bug is > happening in XMPHandler. Attached the formatting objects file with the XMP > metadata. > Would be really nice if you could have a look at it. > Thank you, > Gregor > I am running the command: > fop -r -fo zugferd.fo -pdf zugferd.pdf > {{Juni 10, 2022 7:09:35 PM org.apache.fop.cli.Main startFOP}} > {{SEVERE: Exception}} > {{org.apache.fop.apps.FOPException: java.lang.NullPointerException}} > {{java.lang.NullPointerException}} > {{ at > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:296)}} > {{ at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:116)}} > {{ at org.apache.fop.cli.Main.startFOP(Main.java:183)}} > {{ at org.apache.fop.cli.Main.main(Main.java:214)}} > {{Caused by: java.lang.NullPointerException}} > {{ at > org.apache.xmlgraphics.xmp.XMPHandler.endElement(XMPHandler.java:291)}} > {{ at org.apache.fop.fo.FOTreeBuilder$3.run(FOTreeBuilder.java:207)}} > {{ at org.apache.fop.fo.FOTreeBuilder$3.run(FOTreeBuilder.java:204)}} > {{ at > java.base/java.security.AccessController.doPrivileged(AccessController.java:312)}} > {{ at > org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:203)}} > {{ at > org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)}} > {{ at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown > Source)}} > {{ at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown > Source)}} > {{ at > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown > Source)}} > {{ at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown > Source)}} > {{ at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown > Source)}} > {{ at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source)}} > {{ at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source)}} > {{ at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)}} > {{ at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown > Source)}} > {{ at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown > Source)}} > {{ at > org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)}} > {{ at > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:293)}} > {{ ... 3 more}} > > > The bug might also be caused in org.apache.xmlgraphics.xmp.XMPHandler > The line before the null pointer stated > {{assert getCurrentProperties() != null : "no current property";}} > > {{The FO File is also attached to this report.}} > > > {{}} > {{http://www.w3.org/1999/XSL/Format";>}} > {{}} > {{ page-height="297mm" margin-top="0mm"}} > {{margin-bottom="0mm" margin-left="0mm" margin-right="0mm">}} > {{ margin-right="15mm"/>}} > {{}} > {{}} > {{}} > {{http://www.w3.org/1999/02/22-rdf-syntax-ns#";>}} > {{ xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"}} > {{xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"}} > {{xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#"; rdf:about="">}} > {{}} > {{}} > {{}} > {{Factur-X PDFA Extension Schema}} > {{urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#}} > {{}} > {{fx}} > {{}} > {{}} > {{}} > {{DocumentFileName}} > {{Text}} > {{external}} > {{name of the embedded XML invoice file}} > {{}} > {{}} > {{}} > {{DocumentType}} > {{Text}} > {{external}} > {{INVOICE}} > {{}} > {{}} > {{Version}} > {{Text}} > {{external}} > {{The actual version of the Factur-X XML schema}} > {{}} > {{}} > {{}} > {{ConformanceLeve
[jira] [Updated] (XGC-130) NullPointerException in org.apache.xmlgraphics.xmp.XMPHandler.endElement
[ https://issues.apache.org/jira/browse/XGC-130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gregor Müller updated XGC-130: -- Attachment: zugferd-1.fo > NullPointerException in org.apache.xmlgraphics.xmp.XMPHandler.endElement > > > Key: XGC-130 > URL: https://issues.apache.org/jira/browse/XGC-130 > Project: XMLGraphicsCommons > Issue Type: Bug > Components: xmp >Affects Versions: 2.7 >Reporter: Gregor Müller >Priority: Major > Attachments: zugferd-1.fo, zugferd.fo > > > Hi there, > when using XMP metadata for formatting objects I get a null pointer from the > org.apache.xmlgraphics.xmp.XMPHandler class. > I also opened a ticket in fop > (https://issues.apache.org/jira/browse/FOP-3076) But it seems the bug is > happening in XMPHandler. Attached the formatting objects file with the XMP > metadata. > Would be really nice if you could have a look at it. > Thank you, > Gregor > I am running the command: > fop -r -fo zugferd.fo -pdf zugferd.pdf > {{Juni 10, 2022 7:09:35 PM org.apache.fop.cli.Main startFOP}} > {{SEVERE: Exception}} > {{org.apache.fop.apps.FOPException: java.lang.NullPointerException}} > {{java.lang.NullPointerException}} > {{ at > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:296)}} > {{ at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:116)}} > {{ at org.apache.fop.cli.Main.startFOP(Main.java:183)}} > {{ at org.apache.fop.cli.Main.main(Main.java:214)}} > {{Caused by: java.lang.NullPointerException}} > {{ at > org.apache.xmlgraphics.xmp.XMPHandler.endElement(XMPHandler.java:291)}} > {{ at org.apache.fop.fo.FOTreeBuilder$3.run(FOTreeBuilder.java:207)}} > {{ at org.apache.fop.fo.FOTreeBuilder$3.run(FOTreeBuilder.java:204)}} > {{ at > java.base/java.security.AccessController.doPrivileged(AccessController.java:312)}} > {{ at > org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:203)}} > {{ at > org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)}} > {{ at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown > Source)}} > {{ at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown > Source)}} > {{ at > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown > Source)}} > {{ at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown > Source)}} > {{ at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown > Source)}} > {{ at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source)}} > {{ at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source)}} > {{ at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)}} > {{ at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown > Source)}} > {{ at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown > Source)}} > {{ at > org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)}} > {{ at > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:293)}} > {{ ... 3 more}} > > > The bug might also be caused in org.apache.xmlgraphics.xmp.XMPHandler > The line before the null pointer stated > {{assert getCurrentProperties() != null : "no current property";}} > > {{The FO File is also attached to this report.}} > > > {{}} > {{http://www.w3.org/1999/XSL/Format";>}} > {{}} > {{ page-height="297mm" margin-top="0mm"}} > {{margin-bottom="0mm" margin-left="0mm" margin-right="0mm">}} > {{ margin-right="15mm"/>}} > {{}} > {{}} > {{}} > {{http://www.w3.org/1999/02/22-rdf-syntax-ns#";>}} > {{ xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"}} > {{xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"}} > {{xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#"; rdf:about="">}} > {{}} > {{}} > {{}} > {{Factur-X PDFA Extension Schema}} > {{urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#}} > {{}} > {{fx}} > {{}} > {{}} > {{}} > {{DocumentFileName}} > {{Text}} > {{external}} > {{name of the embedded XML invoice file}} > {{}} > {{}} > {{}} > {{DocumentType}} > {{Text}} > {{external}} > {{INVOICE}} > {{}} > {{}} > {{Version}} > {{Text}} > {{external}} > {{The actual version of the Factur-X XML schema}} > {{}} > {{}} > {{}} > {{ConformanceLevel}} > {{Text}} > {{external}} > {{The conformance level of the embedded Factur-X > data}} > {{}} > {{}} > {{}} > {{}} > {{}} > {{}} > {{}} > {{}} > {{ xmlns:fx="urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#" rdf:about=""}} > {{fx:ConformanceLevel="EN 16931" fx:DocumentFileName="factur-x.xml" > fx:DocumentType="INVOICE"}}
[jira] [Resolved] (XGC-130) NullPointerException in org.apache.xmlgraphics.xmp.XMPHandler.endElement
[ https://issues.apache.org/jira/browse/XGC-130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simon Steiner resolved XGC-130. --- Resolution: Duplicate > NullPointerException in org.apache.xmlgraphics.xmp.XMPHandler.endElement > > > Key: XGC-130 > URL: https://issues.apache.org/jira/browse/XGC-130 > Project: XMLGraphicsCommons > Issue Type: Bug > Components: xmp >Affects Versions: 2.7 >Reporter: Gregor Müller >Priority: Major > Attachments: zugferd.fo > > > Hi there, > when using XMP metadata for formatting objects I get a null pointer from the > org.apache.xmlgraphics.xmp.XMPHandler class. > I also opened a ticket in fop > (https://issues.apache.org/jira/browse/FOP-3076) But it seems the bug is > happening in XMPHandler. Attached the formatting objects file with the XMP > metadata. > Would be really nice if you could have a look at it. > Thank you, > Gregor > I am running the command: > fop -r -fo zugferd.fo -pdf zugferd.pdf > {{Juni 10, 2022 7:09:35 PM org.apache.fop.cli.Main startFOP}} > {{SEVERE: Exception}} > {{org.apache.fop.apps.FOPException: java.lang.NullPointerException}} > {{java.lang.NullPointerException}} > {{ at > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:296)}} > {{ at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:116)}} > {{ at org.apache.fop.cli.Main.startFOP(Main.java:183)}} > {{ at org.apache.fop.cli.Main.main(Main.java:214)}} > {{Caused by: java.lang.NullPointerException}} > {{ at > org.apache.xmlgraphics.xmp.XMPHandler.endElement(XMPHandler.java:291)}} > {{ at org.apache.fop.fo.FOTreeBuilder$3.run(FOTreeBuilder.java:207)}} > {{ at org.apache.fop.fo.FOTreeBuilder$3.run(FOTreeBuilder.java:204)}} > {{ at > java.base/java.security.AccessController.doPrivileged(AccessController.java:312)}} > {{ at > org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:203)}} > {{ at > org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)}} > {{ at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown > Source)}} > {{ at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown > Source)}} > {{ at > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown > Source)}} > {{ at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown > Source)}} > {{ at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown > Source)}} > {{ at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source)}} > {{ at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source)}} > {{ at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)}} > {{ at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown > Source)}} > {{ at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown > Source)}} > {{ at > org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)}} > {{ at > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:293)}} > {{ ... 3 more}} > > > The bug might also be caused in org.apache.xmlgraphics.xmp.XMPHandler > The line before the null pointer stated > {{assert getCurrentProperties() != null : "no current property";}} > > {{The FO File is also attached to this report.}} > > > {{}} > {{http://www.w3.org/1999/XSL/Format";>}} > {{}} > {{ page-height="297mm" margin-top="0mm"}} > {{margin-bottom="0mm" margin-left="0mm" margin-right="0mm">}} > {{ margin-right="15mm"/>}} > {{}} > {{}} > {{}} > {{http://www.w3.org/1999/02/22-rdf-syntax-ns#";>}} > {{ xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"}} > {{xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"}} > {{xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#"; rdf:about="">}} > {{}} > {{}} > {{}} > {{Factur-X PDFA Extension Schema}} > {{urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#}} > {{}} > {{fx}} > {{}} > {{}} > {{}} > {{DocumentFileName}} > {{Text}} > {{external}} > {{name of the embedded XML invoice file}} > {{}} > {{}} > {{}} > {{DocumentType}} > {{Text}} > {{external}} > {{INVOICE}} > {{}} > {{}} > {{Version}} > {{Text}} > {{external}} > {{The actual version of the Factur-X XML schema}} > {{}} > {{}} > {{}} > {{ConformanceLevel}} > {{Text}} > {{external}} > {{The conformance level of the embedded Factur-X > data}} > {{}} > {{}} > {{}} > {{}} > {{}} > {{}} > {{}} > {{}} > {{ xmlns:fx="urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#" rdf:about=""}} > {{fx:ConformanceLevel="EN 16931" fx:DocumentFileName="factur-x.xml" > fx:DocumentType="INVOICE"}} > {{fx:Version
[jira] [Commented] (XGC-130) NullPointerException in org.apache.xmlgraphics.xmp.XMPHandler.endElement
[ https://issues.apache.org/jira/browse/XGC-130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17557991#comment-17557991 ] Simon Steiner commented on XGC-130: --- there is a example on https://xmlgraphics.apache.org/fop/trunk/metadata.html > NullPointerException in org.apache.xmlgraphics.xmp.XMPHandler.endElement > > > Key: XGC-130 > URL: https://issues.apache.org/jira/browse/XGC-130 > Project: XMLGraphicsCommons > Issue Type: Bug > Components: xmp >Affects Versions: 2.7 >Reporter: Gregor Müller >Priority: Major > Attachments: zugferd.fo > > > Hi there, > when using XMP metadata for formatting objects I get a null pointer from the > org.apache.xmlgraphics.xmp.XMPHandler class. > I also opened a ticket in fop > (https://issues.apache.org/jira/browse/FOP-3076) But it seems the bug is > happening in XMPHandler. Attached the formatting objects file with the XMP > metadata. > Would be really nice if you could have a look at it. > Thank you, > Gregor > I am running the command: > fop -r -fo zugferd.fo -pdf zugferd.pdf > {{Juni 10, 2022 7:09:35 PM org.apache.fop.cli.Main startFOP}} > {{SEVERE: Exception}} > {{org.apache.fop.apps.FOPException: java.lang.NullPointerException}} > {{java.lang.NullPointerException}} > {{ at > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:296)}} > {{ at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:116)}} > {{ at org.apache.fop.cli.Main.startFOP(Main.java:183)}} > {{ at org.apache.fop.cli.Main.main(Main.java:214)}} > {{Caused by: java.lang.NullPointerException}} > {{ at > org.apache.xmlgraphics.xmp.XMPHandler.endElement(XMPHandler.java:291)}} > {{ at org.apache.fop.fo.FOTreeBuilder$3.run(FOTreeBuilder.java:207)}} > {{ at org.apache.fop.fo.FOTreeBuilder$3.run(FOTreeBuilder.java:204)}} > {{ at > java.base/java.security.AccessController.doPrivileged(AccessController.java:312)}} > {{ at > org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:203)}} > {{ at > org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)}} > {{ at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown > Source)}} > {{ at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown > Source)}} > {{ at > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown > Source)}} > {{ at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown > Source)}} > {{ at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown > Source)}} > {{ at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source)}} > {{ at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source)}} > {{ at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)}} > {{ at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown > Source)}} > {{ at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown > Source)}} > {{ at > org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)}} > {{ at > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:293)}} > {{ ... 3 more}} > > > The bug might also be caused in org.apache.xmlgraphics.xmp.XMPHandler > The line before the null pointer stated > {{assert getCurrentProperties() != null : "no current property";}} > > {{The FO File is also attached to this report.}} > > > {{}} > {{http://www.w3.org/1999/XSL/Format";>}} > {{}} > {{ page-height="297mm" margin-top="0mm"}} > {{margin-bottom="0mm" margin-left="0mm" margin-right="0mm">}} > {{ margin-right="15mm"/>}} > {{}} > {{}} > {{}} > {{http://www.w3.org/1999/02/22-rdf-syntax-ns#";>}} > {{ xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"}} > {{xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"}} > {{xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#"; rdf:about="">}} > {{}} > {{}} > {{}} > {{Factur-X PDFA Extension Schema}} > {{urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#}} > {{}} > {{fx}} > {{}} > {{}} > {{}} > {{DocumentFileName}} > {{Text}} > {{external}} > {{name of the embedded XML invoice file}} > {{}} > {{}} > {{}} > {{DocumentType}} > {{Text}} > {{external}} > {{INVOICE}} > {{}} > {{}} > {{Version}} > {{Text}} > {{external}} > {{The actual version of the Factur-X XML schema}} > {{}} > {{}} > {{}} > {{ConformanceLevel}} > {{Text}} > {{external}} > {{The conformance level of the embedded Factur-X > data}} > {{}} > {{}} > {{}} > {{}} > {{}} > {{}} > {{}} > {{}} > {{ xmlns:fx="urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#" rdf:about=""}} > {{fx:C