xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graeme Wellington <graeme.welling...@ptbuildingsolutions.com.au>
Subject FOP 1.1 to 2.2 Migration - SEVERE Error with External Graphics
Date Wed, 14 Mar 2018 02:12:42 GMT
Hi

I have just migrated to FOP 2.2 - I am using apache-tomcat-8.5.29 / Java 1.8

I am using a FOP servlet to render PDF form XML data source.

I have a basic example that works on FOP 1.1 but not FOP 2.2

http://localhost:8080/fop/fopZ?fo=C:/temp/readme.fo

The readme.fo comes with the FOP distribution.

Without change the servlet works ok and I get a PDF.

When I try and add 1 line to include an image I get SEVERE error as below.

I have tried various permutations if the following lines separately but no luck :

<fo:external-graphic src="C:/Temp/tomcat .gif"/>
OR
                <fo:external-graphic src="tomcat.gif"/>
                OR
                <fo:external-graphic src="../graphics/tomcat.gif"/>
                ...

I have loaded the tomcat.gif at the various locations to match.

However I do not think it is getting that far.

I have a customised configuration file and have set the base as follows:

<base>./</base>


Can anyone help?


Mar 14, 2018 12:06:34 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [FopZ] in context with path [/fop] threw exception [javax.xml.transform.TransformerException:
java.lang.NullPointerException] with root cause
java.lang.NullPointerException
                at java.io.FilterInputStream.markSupported(FilterInputStream.java:243)
                at org.apache.xmlgraphics.image.loader.util.ImageUtil.decorateMarkSupported(ImageUtil.java:213)
                at org.apache.xmlgraphics.image.loader.util.ImageUtil.autoDecorateInputStream(ImageUtil.java:228)
                at org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.createImageSource(AbstractImageSessionContext.java:373)
                at org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.access$100(AbstractImageSessionContext.java:53)
                at org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext$UnrestrictedFallbackResolver.createSource(AbstractImageSessionContext.java:364)
                at org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.newSource(AbstractImageSessionContext.java:94)
                at org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.needSource(AbstractImageSessionContext.java:191)
                at org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:123)
                at org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:123)
                at org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:81)
                at org.apache.fop.fo.FObj.processNode(FObj.java:126)
                at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:291)
                at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179)
                at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:208)
                at com.sun.org.apache.xml.internal.serializer.ToSAXHandler.flushPending(ToSAXHandler.java:281)
                at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:247)
                at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
                at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:183)
                at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:351)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
                at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
                at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
                at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
                at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
                at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
                at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:641)
                at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:737)
                at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:351)
                at org.apache.fop.servlet.FopServletZ.render(FopServletZ.java:293)
                at org.apache.fop.servlet.FopServletZ.renderFO(FopServletZ.java:232)
                at org.apache.fop.servlet.FopServletZ.doGet(FopServletZ.java:169)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
                at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
                at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
                at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
                at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
                at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
                at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                at java.lang.Thread.run(Thread.java:745)



Regards

Graeme Wellington
Pro-Time Building Solutions Pty Ltd
178 Martin Road WALL FLAT SA 5254
Mobile: 0419 808 473
Email: graeme.wellington@ptbuildingsolutions.com.au<mailto:graeme.wellington@ptbuildingsolutions.com.au>

[PTBSX-Logo]


Mime
View raw message