Home pageFind It!Contact PJAPJA documentation

PJA

 PJA Toolkit forum

This forum is dedicated to PJA Toolkit.
You may read freely the messages it contents. If you want to write a message or answer to a subject, subscribe to it first.

Subjects Recent messages Login Subscribe

Messages of subject Null pointer in PJA-2.5beta

richard

Location : Scottsdale, USA
Member since : Feb 27, 2004
Messages : 1
 Feb 27, 2004 at 7:55 PM
I am using a combination of fop/batik to generated PDF's from SVG (XML) in a Tomcat 5/IBM Java 1.4/AMD64 environment. Batik uses awt calls which is why I am using PJA.

I am using the pja-2.5beta and getting the following exception in some cases. Any ideas on how to fix this? The NPE does not reference a PJA class from what I can tell, so I am not sure it is a PJA problem. Here's the exception:

[ERROR] svg graphic could not be rendered: null
java.lang.NullPointerException
at java.awt.geom.GeneralPath.append(GeneralPath.java(Compiled Code))
at java.awt.geom.GeneralPath.append(GeneralPath.java:309)
at org.apache.batik.gvt.CompositeShapePainter.getPaintedBounds2D(CompositeShapePainter.java:151)
at org.apache.batik.gvt.ShapeNode.getPrimitiveBounds(ShapeNode.java(Compiled Code))
at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedPrimitiveBounds(AbstractGraphicsNode.java:834)
at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(AbstractGraphicsNode.java:800)
at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(CompositeGraphicsNode.java:210)
at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(AbstractGraphicsNode.java:800)
at org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(CompositeGraphicsNode.java:210)
at org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(AbstractGraphicsNode.java:800)
at org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(CompositeGraphicsNode.java:162)
at org.apache.batik.gvt.AbstractGraphicsNode.getBounds(AbstractGraphicsNode.java(Compiled Code))
at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:471)
at org.apache.fop.render.pdf.PDFRenderer.renderSVGDocument(PDFRenderer.java:647)
at org.apache.fop.render.pdf.PDFRenderer.renderSVGArea(PDFRenderer.java:549)
at org.apache.fop.svg.SVGArea.render(SVGArea.java:98)
at org.apache.fop.render.pdf.PDFRenderer.renderForeignObjectArea(PDFRenderer.java:533)
at org.apache.fop.layout.inline.ForeignObjectArea.render(ForeignObjectArea.java:89)
at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:516)
at org.apache.fop.layout.LineArea.render(LineArea.java:519)
at org.apache.fop.render.AbstractRenderer.renderBlockArea(AbstractRenderer.java:485)
at org.apache.fop.layout.BlockArea.render(BlockArea.java:117)
at org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRenderer.java:451)
at org.apache.fop.layout.ColumnArea.render(ColumnArea.java:71)
at org.apache.fop.render.AbstractRenderer.renderSpanArea(AbstractRenderer.java:100)
at org.apache.fop.layout.SpanArea.render(SpanArea.java:94)
at org.apache.fop.render.AbstractRenderer.renderBodyAreaContainer(AbstractRenderer.java:368)
at org.apache.fop.layout.BodyAreaContainer.render(BodyAreaContainer.java:137)
at org.apache.fop.render.AbstractRenderer.renderRegions(AbstractRenderer.java:529)
at org.apache.fop.render.pdf.PDFRenderer.renderPage(PDFRenderer.java:904)
at org.apache.fop.render.pdf.PDFRenderer.render(PDFRenderer.java:880)
at org.apache.fop.apps.StreamRenderer.queuePage(StreamRenderer.java:302)
at org.apache.fop.layout.AreaTree.addPage(AreaTree.java:108)
at org.apache.fop.fo.pagination.PageSequence.makePage(PageSequence.java:415)
at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:338)
at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:262)
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java(Compiled Code))
at org.apache.xerces.parsers.AbstractSAXParser.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.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.fop.apps.Driver.render(Driver.java:498)
at org.apache.fop.apps.Driver.run(Driver.java:565)
at com.ltoj.webapp.action.SVG2PDFServlet.doGet(SVG2PDFServlet.java:109)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at com.ltoj.webapp.filter.BreadCrumbFilter.doFilter(BreadCrumbFilter.java:94)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:509)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:732)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688)
at java.lang.Thread.run(Thread.java:568)
[DEBUG] Last page-sequence produced 1 pages.

Thanks - Richard

Manu

Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
 Mar 11, 2004 at 7:21 AM
From the stack trace you provided, it looks like you didn't use correctly Batik library or there's a bug in getPaintedBounds2D method of the org.apache.batik.gvt.CompositeShapePainter class. You should better ask you question to Batik support...
---
Manu (moderator/modérateur)


Home pageFind It!ContactTop

© Copyrights 1997-2023 eTeks - All rights reserved

PJAPJA documentation