xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Levinson <Jonathan.Levin...@intersystems.com>
Subject RE: Null Poinuter exception in batik when using linearGradient
Date Thu, 12 Jan 2012 14:50:04 GMT
Thanks Luis!  I tried the batik from trunk and the PDF rendered fine, no NullPointerException!
Thank you for resolving this problem!

Best Regards,
Jonathan Levinson
Senior Software Developer
Object Group
InterSystems
+1 617-621-0600
jonathan.levinson@intersystems.com

From: Luis Bernardo [mailto:lmpmbernardo@gmail.com]
Sent: Tuesday, January 10, 2012 6:03 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Null Poinuter exception in batik when using linearGradient


Nice pie!

The problem seems to be with the batik jar included in FOP. I just ran it against batik trunk
and it generated the PDF (attached). I suggest you replace the jar by one provided by Batik
or build one from the trunk.


On 1/10/12 8:44 PM, Jonathan Levinson wrote:
Hi,

With skynav-fop-de1b874, I get a NullPointerException in batik.  I don't think the problem
is due to skynav.  I also get a null pointer exception in fop-1.0, but without a stack trace.
 I suspect the fop trunk has been updated to include a stack trace in this case.

In any case, the attached .fo file won't render the SVG with FOP.  It seems to be complaining
about a gradient I've defined but I don't know which one or why.

Could anyone on this list help me with an insight or a work-around?

If I get rid of ALL the gradients the PDF renders fine, but my PDF rendering is supposed to
be duplicating the HTML rendering of the SVG, which employs the gradients successfully in
for example FireFox.

Jan 10, 2012 3:32:01 PM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: SVG graphic could not be built. Reason: java.lang.NullPointerException
java.lang.NullPointerException
               at org.apache.batik.bridge.SVGLinearGradientElementBridge.buildGradient(Unknown
Source)
               at org.apache.batik.bridge.AbstractSVGGradientElementBridge.createPaint(Unknown
Source)
               at org.apache.batik.bridge.PaintServer.convertURIPaint(Unknown Source)
               at org.apache.batik.bridge.PaintServer.convertPaint(Unknown Source)
               at org.apache.batik.bridge.PaintServer.convertFillPaint(Unknown Source)
               at org.apache.batik.bridge.PaintServer.convertFillAndStroke(Unknown Source)
               at org.apache.batik.bridge.SVGShapeElementBridge.createShapePainter(Unknown
Source)
               at org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createFillStrokePainter(Unknown
Source)
               at org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createShapePainter(Unknown
Source)
               at org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(Unknown
Source)
               at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
               at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
               at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
               at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
               at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
               at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
               at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
               at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
               at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
               at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
               at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
               at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
               at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
               at org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:98)
               at org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:228)
               at org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:184)
               at org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:149)
               at org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingDocument(AbstractIFPainter.java:298)
               at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:202)
               at org.apache.fop.render.intermediate.IFRenderer.renderForeignObject(IFRenderer.java:1271)
               at org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:816)
               at org.apache.fop.render.AbstractPathOrientedRenderer.renderInlineViewport(AbstractPathOrientedRenderer.java:777)
               at org.apache.fop.render.intermediate.IFRenderer.renderInlineViewport(IFRenderer.java:851)
               at org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:674)
               at org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:898)
               at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:639)
               at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:557)
               at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:594)
               at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:964)
               at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:542)
               at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:594)
               at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:964)
               at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:542)
               at org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:447)
               at org.apache.fop.render.AbstractPathOrientedRenderer.renderFlow(AbstractPathOrientedRenderer.java:730)
               at org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.java:424)
               at org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.java:348)
               at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:295)
               at org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRenderer.java:734)
               at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:269)
               at org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:234)
               at org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java:583)
               at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:117)
               at org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:313)
               at org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:173)
               at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:115)
               at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:258)
               at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:128)
               at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:349)
               at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
               at net.sf.saxon.event.ContentHandlerProxy.endElement(ContentHandlerProxy.java:391)
               at net.sf.saxon.event.NamespaceReducer.endElement(NamespaceReducer.java:213)
               at net.sf.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHandler.java:447)
               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 net.sf.saxon.event.Sender.sendSAXSource(Sender.java:397)
               at net.sf.saxon.event.Sender.send(Sender.java:156)
               at net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:32)
               at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:300)
               at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
               at org.apache.fop.cli.Main.startFOP(Main.java:177)
               at org.apache.fop.cli.Main.main(Main.java:208)
Jan 10, 2012 3:32:01 PM org.apache.fop.events.LoggingEventListener processEvent
INFO: Rendered page #1.

Best Regards,
Jonathan Levinson
Senior Software Developer
Object Group
InterSystems
+1 617-621-0600
jonathan.levinson@intersystems.com<mailto:jonathan.levinson@intersystems.com>







---------------------------------------------------------------------

To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org<mailto:fop-users-unsubscribe@xmlgraphics.apache.org>

For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org<mailto:fop-users-help@xmlgraphics.apache.org>


Mime
View raw message