Fop
  1. Fop
  2. FOP-1125

NullPointerException while rendering rtf

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 0.91
    • Fix Version/s: None
    • Component/s: renderer/rtf
    • Labels:
      None
    • Environment:
      Operating System: Windows 2000
      Platform: PC
    • External issue ID:
      38132

      Description

      Hi,

      Hopefully this is not inappropriate (first time reporting bug), but i searched
      and searched and could not find a satisfactory answer anywhere else...

      I have a document that renders ok with -pdf, but when I try with the -rtf option
      I get a NullPointerException.

      Here's the output with the -d option

      endElement for top-level fo:root
      Parsing of document complete
      java.lang.NullPointerException
      Exception
      javax.xml.transform.TransformerException: java.lang.NullPointerException
      at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:144)
      at org.apache.fop.cli.InputHandler.render(InputHandler.java:101)
      at org.apache.fop.cli.Main.startFOP(Main.java:167)
      at org.apache.fop.cli.Main.main(Main.java:200)

      ---------

      javax.xml.transform.TransformerException: java.lang.NullPointerException
      at
      org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1430)
      at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709)
      at
      org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1284)
      at
      org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1262)
      at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:141)
      at org.apache.fop.cli.InputHandler.render(InputHandler.java:101)
      at org.apache.fop.cli.Main.startFOP(Main.java:167)
      at org.apache.fop.cli.Main.main(Main.java:200)
      Caused by: java.lang.NullPointerException
      at java.io.Writer.write(Unknown Source)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeControlWord(RtfElement.java:109)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeOneAttribute(RtfElement.java:228)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeAttributes(RtfElement.java:203)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeOneAttribute(RtfElement.java:225)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeAttributes(RtfElement.java:203)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTextrun$RtfOpenGroupMark.writeRtfContent(RtfTextrun.java:71)
      at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:86)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTextrun.writeRtfContent(RtfTextrun.java:372)
      at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:86)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer.writeRtfContent(RtfContainer.java:135)
      at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:86)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer.writeRtfContent(RtfContainer.java:135)
      at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:86)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer.writeRtfContent(RtfContainer.java:135)
      at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:86)
      at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfFile.flush(RtfFile.java:219)
      at org.apache.fop.render.rtf.RTFHandler.endDocument(RTFHandler.java:155)
      at org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:246)
      at org.apache.xml.serializer.ToXMLSAXHandler.endDocument(ToXMLSAXHandler.java:181)
      at
      org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1378)
      ... 7 more
      ---------
      java.lang.NullPointerException
      at java.io.Writer.write(Unknown Source)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeControlWord(RtfElement.java:109)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeOneAttribute(RtfElement.java:228)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeAttributes(RtfElement.java:203)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeOneAttribute(RtfElement.java:225)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeAttributes(RtfElement.java:203)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTextrun$RtfOpenGroupMark.writeRtfContent(RtfTextrun.java:71)
      at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:86)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTextrun.writeRtfContent(RtfTextrun.java:372)
      at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:86)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer.writeRtfContent(RtfContainer.java:135)
      at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:86)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer.writeRtfContent(RtfContainer.java:135)
      at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:86)
      at
      org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer.writeRtfContent(RtfContainer.java:135)
      at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:86)
      at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfFile.flush(RtfFile.java:219)
      at org.apache.fop.render.rtf.RTFHandler.endDocument(RTFHandler.java:155)
      at org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:246)
      at org.apache.xml.serializer.ToXMLSAXHandler.endDocument(ToXMLSAXHandler.java:181)
      at
      org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1378)
      at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709)
      at
      org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1284)
      at
      org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1262)
      at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:141)
      at org.apache.fop.cli.InputHandler.render(InputHandler.java:101)
      at org.apache.fop.cli.Main.startFOP(Main.java:167)
      at org.apache.fop.cli.Main.main(Main.java:200)

      I'm no expert, so I'm a bit stumped...

      1. relnote.fo
        5 kB
        Simo Kurra

        Activity

        Hide
        Chris Bowditch added a comment -

        In order to track the problem down we really need a sample FO file that
        demonstrates the problem. Please can you attach one?

        Thanks,

        Chris

        Show
        Chris Bowditch added a comment - In order to track the problem down we really need a sample FO file that demonstrates the problem. Please can you attach one? Thanks, Chris
        Hide
        Simo Kurra added a comment -

        Attachment relnote.fo has been added with description: Offending fo

        Show
        Simo Kurra added a comment - Attachment relnote.fo has been added with description: Offending fo
        Hide
        Jeremias Maerki added a comment -

        Bug fixed in SVN: http://svn.apache.org/viewcvs?rev=366148&view=rev

        The problem was the "inset" border style which was not mapped. The method doing
        the mapping returned a "null" value instead of a fallback value.

        Show
        Jeremias Maerki added a comment - Bug fixed in SVN: http://svn.apache.org/viewcvs?rev=366148&view=rev The problem was the "inset" border style which was not mapped. The method doing the mapping returned a "null" value instead of a fallback value.
        Hide
        Glenn Adams added a comment -

        batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

        Show
        Glenn Adams added a comment - batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

          People

          • Assignee:
            fop-dev
            Reporter:
            Simo Kurra
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development