You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Matthias Kräuter <m....@exxcellent.de> on 2002/11/27 08:53:04 UTC
Unknown Fromatting Object null^null
Hello,
my old problem still exists. The stacktrace now shows line numbers but I
don´t think it helps very much. I tried newer versions of Xalan (2.4D1)
and Xerces (2.1.0) but nothing changed. My supplied Document is not
read from file but a transformation result in memory. I than inserted a
document fragment with an fo:table into it with database data. Could
there be a problem with the namespace of this fragment?
The stacktrace:
[reports] [ERROR] Unknown formatting object null^null
UILD FAILED
ava.lang.NullPointerException
at
org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:238)
at org.apache.fop.tools.DocumentReader.parse(DocumentReader.java:444)
at org.apache.fop.apps.Driver.render(Driver.java:469)
at org.apache.fop.apps.Driver.render(Driver.java:489)
at cmp.Report.execute(Report.java:581)
at org.apache.tools.ant.Task.perform(Task.java:317)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:334)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
at org.apache.tools.ant.Main.runBuild(Main.java:610)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
My source code looks like that:
Driver driver = new Driver();
driver.setRenderer(driver.RENDER_PDF);
File pdfFile = new File("report.pdf");
driver.setOutputStream(new FileOutputStream(pdfFile));
driver.render(pdfDoc);
driver.run();
pdfDoc is a DOM Document.
My .fo Document with the inserted table:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
...
<fo:table>
<fo:table-column
column-width="proportional-column-width(1)"/>
<fo:table-column
column-width="proportional-column-width(1)"/>
<fo:table-column
column-width="proportional-column-width(1)"/>
<fo:table-column
column-width="proportional-column-width(1)"/>
<fo:table-column
column-width="proportional-column-width(1)"/>
<fo:table-header>
...
</fo:table>
...
</fo:root>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Unknown Fromatting Object null^null
Posted by Jeremias Maerki <de...@greenmail.ch>.
On 27.11.2002 08:53:04 Matthias Kräuter wrote:
> Hello,
>
> my old problem still exists. The stacktrace now shows line numbers but I
> don´t think it helps very much. I tried newer versions of Xalan (2.4D1)
> and Xerces (2.1.0) but nothing changed. My supplied Document is not
> read from file but a transformation result in memory. I than inserted a
> document fragment with an fo:table into it with database data. Could
> there be a problem with the namespace of this fragment?
Aha. You could be on the right track. Does it work if you don't include
the table from the database? (bugfinding using exclusion)
Do I get you right? You're generating an FO file as a DOM in some way
and then include a FO fragment built from database data in the DOM?
Isn't that a bit too awful to do? The basic FO file is generated from an
XML via XSLT? Have you tried to supply the DOM as parameter to the XSL
transformation?
Maybe Cocoon is something you should look at.
Your code below doesn't show how you construct the DOM and that's what's
most interesting here.
> The stacktrace:
>
> [reports] [ERROR] Unknown formatting object null^null
>
> UILD FAILED
> ava.lang.NullPointerException
> at
> org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:238)
> at org.apache.fop.tools.DocumentReader.parse(DocumentReader.java:444)
> at org.apache.fop.apps.Driver.render(Driver.java:469)
> at org.apache.fop.apps.Driver.render(Driver.java:489)
> at cmp.Report.execute(Report.java:581)
> at org.apache.tools.ant.Task.perform(Task.java:317)
> at org.apache.tools.ant.Target.execute(Target.java:309)
> at org.apache.tools.ant.Target.performTasks(Target.java:334)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
> at org.apache.tools.ant.Main.runBuild(Main.java:610)
> at org.apache.tools.ant.Main.start(Main.java:196)
> at org.apache.tools.ant.Main.main(Main.java:235)
>
> My source code looks like that:
> Driver driver = new Driver();
> driver.setRenderer(driver.RENDER_PDF);
>
> File pdfFile = new File("report.pdf");
> driver.setOutputStream(new FileOutputStream(pdfFile));
>
> driver.render(pdfDoc);
>
> driver.run();
>
> pdfDoc is a DOM Document.
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org