Hello,

I am trying to use FOP by firing SAX events:

        fopDriver.setOutputStream(System.out);
        fopDriver.setRenderer(fopDriver.RENDER_XML);
        stylesheet.newTransformer().transform(
                        new DOMSource(source), 
                        new SAXResult(fopDriver.getContentHandler())
                        );    
        fopDriver.run();

I get a NullPointerException when the formatting object tree is 
built. Am I doing anything wrong? Setting a logger does not help. 
When using the DefaultContentHandler instead of FOP's no error is 
reported. That's why I think it's a FOP bug.

Software: FOP 0.20.4, Sun JDK 1.4.1_01, Linux



Output:
[ERROR] Logger not set
[INFO] building formatting object tree
[WARNING] Screen logger not set.
[INFO] [1]
[INFO] [2]
javax.xml.transform.TransformerException: 
java.lang.NullPointerException
        at 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1226)
        at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:638)
        at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1088)
        at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1066)
        at Paginator.paginate(Paginator.java:38)
        at Paginator.main(Paginator.java:58)
Caused by: java.lang.NullPointerException
        at org.apache.fop.render.xml.XMLRenderer.isCoarseXml(Unknown 
Source)
        at 
org.apache.fop.render.xml.XMLRenderer.renderDisplaySpace(Unknown 
Source)
        at org.apache.fop.layout.DisplaySpace.render(Unknown Source)
        at 
org.apache.fop.render.xml.XMLRenderer.renderBlockArea(Unknown 
Source)
        at org.apache.fop.layout.BlockArea.render(Unknown Source)
        at 
org.apache.fop.render.xml.XMLRenderer.renderAreaContainer(Unknown 
Source)
        at org.apache.fop.layout.AreaContainer.render(Unknown Source)
        at 
org.apache.fop.render.xml.XMLRenderer.renderAreaContainer(Unknown 
Source)
        at org.apache.fop.layout.AreaContainer.render(Unknown Source)
        at 
org.apache.fop.render.xml.XMLRenderer.renderAreaContainer(Unknown 
Source)
        at org.apache.fop.layout.AreaContainer.render(Unknown Source)
        at 
org.apache.fop.render.xml.XMLRenderer.renderAreaContainer(Unknown 
Source)
        at org.apache.fop.layout.AreaContainer.render(Unknown Source)
        at 
org.apache.fop.render.xml.XMLRenderer.renderAreaContainer(Unknown 
Source)
        at org.apache.fop.render.xml.XMLRenderer.renderPage(Unknown 
Source)
        at org.apache.fop.render.xml.XMLRenderer.render(Unknown 
Source)
        at org.apache.fop.apps.StreamRenderer.queuePage(Unknown 
Source)
        at org.apache.fop.layout.AreaTree.addPage(Unknown Source)
        at org.apache.fop.fo.pagination.PageSequence.format(Unknown 
Source)
        at org.apache.fop.apps.StreamRenderer.render(Unknown Source)
        at org.apache.fop.fo.FOTreeBuilder.endElement(Unknown Source)
        at 
org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:307)
        at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:684)
        at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2182)
        at 
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2008)
        at 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1171)
        ... 5 more
---------
java.lang.NullPointerException
        at org.apache.fop.render.xml.XMLRenderer.isCoarseXml(Unknown 
Source)
        at 
org.apache.fop.render.xml.XMLRenderer.renderDisplaySpace(Unknown 
Source)
        at org.apache.fop.layout.DisplaySpace.render(Unknown Source)
        at 
org.apache.fop.render.xml.XMLRenderer.renderBlockArea(Unknown 
Source)
        at org.apache.fop.layout.BlockArea.render(Unknown Source)
        at 
org.apache.fop.render.xml.XMLRenderer.renderAreaContainer(Unknown 
Source)
        at org.apache.fop.layout.AreaContainer.render(Unknown Source)
        at 
org.apache.fop.render.xml.XMLRenderer.renderAreaContainer(Unknown 
Source)
        at org.apache.fop.layout.AreaContainer.render(Unknown Source)
        at 
org.apache.fop.render.xml.XMLRenderer.renderAreaContainer(Unknown 
Source)
        at org.apache.fop.layout.AreaContainer.render(Unknown Source)
        at 
org.apache.fop.render.xml.XMLRenderer.renderAreaContainer(Unknown 
Source)
        at org.apache.fop.layout.AreaContainer.render(Unknown Source)
        at 
org.apache.fop.render.xml.XMLRenderer.renderAreaContainer(Unknown 
Source)
        at org.apache.fop.render.xml.XMLRenderer.renderPage(Unknown 
Source)
        at org.apache.fop.render.xml.XMLRenderer.render(Unknown 
Source)
        at org.apache.fop.apps.StreamRenderer.queuePage(Unknown 
Source)
        at org.apache.fop.layout.AreaTree.addPage(Unknown Source)
        at org.apache.fop.fo.pagination.PageSequence.format(Unknown 
Source)
        at org.apache.fop.apps.StreamRenderer.render(Unknown Source)
        at org.apache.fop.fo.FOTreeBuilder.endElement(Unknown Source)
        at 
org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:307)
        at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:684)
        at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2182)
        at 
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2008)
        at 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1171)
        at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:638)
        at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1088)
        at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1066)
        at Paginator.paginate(Paginator.java:38)
        at Paginator.main(Paginator.java:58)
-- 
Matthias Brunner <[EMAIL PROTECTED]>
PGP FP 7862 32B3 3B75 292A F76F  5042 8587 21AB 5B89 D501
Check out http://blumenstrasse.vol.at/~mb/gpgkey.asc


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to