I was just said on FOP mailing list that this is
a known bug of FOP :
https://issues.apache.org/bugzilla/show_bug.cgi?id=49837
Regards,
Maxime Bégnis
Le 09/09/2010 17:06, Maxime Bégnis a écrit :
4C88F7D9.2020408@neodoc.biz" type="cite">
Hi list,
When I generate a FO file from the following XML, the transformation
into a PDF file using FOP throws a java.lang.NullPointerException. I am
unable to determine the cause of the problem. If I remove the <anchor
xml:id="testid"
/> element,
things are working fine. I tried to setup a minimal FO file with the
code generated by the anchor, but, surprisingly, the PDF is generated
fine from this file. Note that I sent to FOP mailing list a copy of the
stack trace. Maybe you can help me with that?
I have the same result with versions 1.75.2 and 1.76.0 of the style
sheets and versions 0.95 and 1.0 of FOP.
Thanks a lot!
<?xml version="1.0" encoding="UTF-8"?>
<section version="5.0" xml:lang="en"
xmlns="http://docbook.org/ns/docbook">
<title>Test Section</title>
<para>Some text <anchor xml:id="testid" />with an
anchor.</para>
</section>
Stack trace of FOP 0.95 (for info) :
GRAVE: Exception
java.lang.NullPointerException
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125)
at org.apache.fop.cli.Main.startFOP(Main.java:166)
at org.apache.fop.cli.Main.main(Main.java:197)
Caused by: java.lang.NullPointerException
at
org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350)
at
org.apache.fop.layoutmgr.inline.LineLayoutManager.findHyphenationPoints(LineLayoutManager.java:1480)
at
org.apache.fop.layoutmgr.inline.LineLayoutManager.findOptimalBreakingPoints(LineLayoutManager.java:950)
at
org.apache.fop.layoutmgr.inline.LineLayoutManager.createLineBreaks(LineLayoutManager.java:917)
at
org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:607)
at
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:294)
at
org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:116)
at
org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:107)
at
org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:145)
at
org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:552)
at
org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:137)
at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:302)
at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:264)
at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:106)
at
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:234)
at
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:123)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:340)
at
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:169)
at
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214)
... 3 more
---------
java.lang.NullPointerException
at
org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.applyChanges(InlineStackingLayoutManager.java:350)
at
org.apache.fop.layoutmgr.inline.LineLayoutManager.findHyphenationPoints(LineLayoutManager.java:1480)
at
org.apache.fop.layoutmgr.inline.LineLayoutManager.findOptimalBreakingPoints(LineLayoutManager.java:950)
at
org.apache.fop.layoutmgr.inline.LineLayoutManager.createLineBreaks(LineLayoutManager.java:917)
at
org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:607)
at
org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:294)
at
org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:116)
at
org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:107)
at
org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:145)
at
org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:552)
at
org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:137)
at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:302)
at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:264)
at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:106)
at
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:234)
at
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:123)
at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:340)
at
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:169)
at
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125)
at org.apache.fop.cli.Main.startFOP(Main.java:166)
at org.apache.fop.cli.Main.main(Main.java:197)
Maxime Bégnis
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
|