Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-2919

Direct Printing throws NullpointerException in AbstractRenderer

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4
    • 2.6
    • renderer/awt
    • None
    • Windows 10

    Description

      While the Generation of PDF or PostScript Documents still works the output as a direct print

      throws a NullpointerException under FOP 2.4.

      Direct Printing worked under FOP 2.3 without a problem.

       

      Testcall is:    java org.apache.fop.cli.Main  -fo test.fo -print

      ( see attached test.fo file)

      org.apache.fop.apps.FOPException: javax.xml.transform.TransformerException: java.lang.NullPointerException
      javax.xml.transform.TransformerException: 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: javax.xml.transform.TransformerException: java.lang.NullPointerException
      at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:783)
      at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:370)
      at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:293)
      ... 3 more
      Caused by: java.lang.NullPointerException
      at org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.java:527)
      at org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.java:433)
      at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:380)
      at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:345)
      at org.apache.fop.render.java2d.Java2DRenderer.print(Java2DRenderer.java:1008)
      at java.desktop/sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:2275)
      at java.desktop/sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1654)
      at java.desktop/sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1484)
      at org.apache.fop.render.print.PrintRenderer.stopRenderer(PrintRenderer.java:137)
      at org.apache.fop.area.RenderPagesModel.endDocument(RenderPagesModel.java:265)
      at org.apache.fop.area.AreaTreeHandler.endDocument(AreaTreeHandler.java:342)
      at org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:170)
      at java.xml/com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endDocument(ToXMLSAXHandler.java:183)
      at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endDocument(AbstractSAXParser.java:746)
      at java.xml/com.sun.org.apache.xerces.internal.xinclude.XIncludeHandler.endDocument(XIncludeHandler.java:1224)
      at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:546)
      at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)
      at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
      at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
      at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
      at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
      at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:687)
      at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:774)
      ... 5 more

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ssteiner Simon Steiner
            RainerRieder Rainer Rieder
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment