Uploaded image for project: 'XMLGraphicsCommons'
  1. XMLGraphicsCommons
  2. XGC-73

NPE in XMPHandler.endElement when creating a PDF/A-1b document using FOP

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Resolution: Unresolved
    • 1.4
    • None
    • xmp
    • None
    • Operating System:
      Platform: PC

    Description

      When using FOP v1.0 or v1.1rc to create a PDF/A-1b compliant PDF document, embedding an XMP structure that contains an <xmpMM:History> entry leads to a NPE in XMPHandler.endElement.

      This happens, when the history entry contains at least one <stVer:event> entry. I used the Xalan (2.7.0) and Xerces (2.7.1) versions, that are deliverd with FOP v1.0 and v1.1rc1.

      Stacktrace:

      java.lang.NullPointerException
      at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:303)
      at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
      at org.apache.fop.cli.Main.startFOP(Main.java:177)
      at org.apache.fop.cli.Main.main(Main.java:208)
      Caused by: java.lang.NullPointerException
      at org.apache.xmlgraphics.xmp.XMPHandler.endElement(XMPHandler.java:291)
      at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:181)
      at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
      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:484)
      at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:300)
      ... 3 more

      Attachments

        1. npe_issue_20120927.zip
          212 kB
          oliver.moehrke

        Activity

          People

            general@xmlgraphics.apache.org XML Graphics Project Mailing List
            oliver.moehrke@web.de oliver.moehrke
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: