[jira] [Commented] (FOP-3076) Nullpointer with ZUGFeRD XMP MetaData

2022-06-24 Thread Jira


[ 
https://issues.apache.org/jira/browse/FOP-3076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17558466#comment-17558466
 ] 

Gregor Müller commented on FOP-3076:


Thank you for taking care of this. The initially attached file is missing the 
 tag. I added it in the second file (attached to my previous 
comment). However the result is the same. 

> Nullpointer with ZUGFeRD XMP MetaData
> -
>
> Key: FOP-3076
> URL: https://issues.apache.org/jira/browse/FOP-3076
> Project: FOP
>  Issue Type: Bug
>  Components: fo/unqualified
>Affects Versions: 2.7
>Reporter: Gregor Müller
>Assignee: Simon Steiner
>Priority: Major
> Attachments: zugferd-1.fo, zugferd.fo
>
>
> ZUGFeRD allows to add invoice meta data in XML form to pdf documents. Adding 
> the file as attachment works really well. However the ZUGFeRD Standard also 
> requires to add XMP Metadata. When doing that a NullPointerException occurs.
>  
> 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] [Commented] (FOP-3076) Nullpointer with ZUGFeRD XMP MetaData

2022-06-23 Thread Jira


[ 
https://issues.apache.org/jira/browse/FOP-3076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17558229#comment-17558229
 ] 

Gregor Müller commented on FOP-3076:


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]

> Nullpointer with ZUGFeRD XMP MetaData
> -
>
> Key: FOP-3076
> URL: https://issues.apache.org/jira/browse/FOP-3076
> Project: FOP
>  Issue Type: Bug
>  Components: fo/unqualified
>Affects Versions: 2.7
>Reporter: Gregor Müller
>Priority: Major
> Attachments: zugferd-1.fo, zugferd.fo
>
>
> ZUGFeRD allows to add invoice meta data in XML form to pdf documents. Adding 
> the file as attachment works really well. However the ZUGFeRD Standard also 
> requires to add XMP Metadata. When doing that a NullPointerException occurs.
>  
> 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 

[jira] [Commented] (FOP-3076) Nullpointer with ZUGFeRD XMP MetaData

2022-06-23 Thread Simon Steiner (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-3076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17557992#comment-17557992
 ] 

Simon Steiner commented on FOP-3076:


there is a example on https://xmlgraphics.apache.org/fop/trunk/metadata.html

> Nullpointer with ZUGFeRD XMP MetaData
> -
>
> Key: FOP-3076
> URL: https://issues.apache.org/jira/browse/FOP-3076
> Project: FOP
>  Issue Type: Bug
>  Components: fo/unqualified
>Affects Versions: 2.7
>Reporter: Gregor Müller
>Priority: Major
> Attachments: zugferd.fo
>
>
> ZUGFeRD allows to add invoice meta data in XML form to pdf documents. Adding 
> the file as attachment works really well. However the ZUGFeRD Standard also 
> requires to add XMP Metadata. When doing that a NullPointerException occurs.
>  
> 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="1.0"/>}}
> {{}}
> {{}}
> {{}}
> {{}}
> {{Hello ZUGFeRD}}
> {{}}
> {{}}
> {{}}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)