Bug 38132 - NullPointerException while rendering rtf
NullPointerException while rendering rtf
Status: CLOSED FIXED
Product: Fop - Now in Jira
Classification: Unclassified
Component: rtf
0.91
PC Windows 2000
: P2 normal
: ---
Assigned To: fop-dev
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2006-01-05 10:00 UTC by Simo Kurra
Modified: 2012-04-01 06:50 UTC (History)
0 users



Attachments
Offending fo (5.49 KB, application/octet-stream)
2006-01-05 10:55 UTC, Simo Kurra
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simo Kurra 2006-01-05 10:00:03 UTC
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...
Comment 1 Chris Bowditch 2006-01-05 10:18:00 UTC
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
Comment 2 Simo Kurra 2006-01-05 10:55:35 UTC
Created attachment 17331 [details]
Offending fo
Comment 3 Jeremias Maerki 2006-01-05 11:26:48 UTC
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.
Comment 4 Glenn Adams 2012-04-01 06:50:08 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed