xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Szeak (Register Man)" <szea...@gmail.com>
Subject Re: FOP 1.1 to 2.2 Migration - SEVERE Error with External Graphics
Date Wed, 14 Mar 2018 13:36:42 GMT
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi,<br>
      <br>
      FOP from version 2 using standard URI format for pathes.<br>
      So you need to set the pathes in this format also in your FOP
      config and in FO.<br>
      Ie.: /C/Temp/tomcat.gif or ///C/Temp/tomcat.gif<br>
      <br>
      Best regards, Szeak<br>
      <br>
      2018-03-14 03:12 keltezéssel, Graeme Wellington írta:<br>
    </div>
    <blockquote type="cite"
cite="mid:ME1PR01MB05148D1D4C62356CA70CE2ECC7D10@ME1PR01MB0514.ausprd01.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
      <style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:#954F72;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">Hi<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I have just migrated to FOP 2.2 - I am
          using apache-tomcat-8.5.29 / Java 1.8<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I am using a FOP servlet to render PDF form
          XML data source.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I have a basic example that works on FOP
          1.1 but not FOP 2.2<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><a
            href="http://localhost:8080/fop/fopZ?fo=C:/temp/readme.fo"
            moz-do-not-send="true">http://localhost:8080/fop/fopZ?fo=C:/temp/readme.fo</a><o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">The readme.fo comes with the FOP
          distribution.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Without change the servlet works ok and I
          get a PDF.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">When I try and add 1 line to include an
          image I get SEVERE error as below.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I have tried various permutations if the
          following lines separately but no luck :<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal" style="text-indent:.5in">&lt;fo:external-graphic
          src="C:/Temp/tomcat .gif"/&gt;<o:p></o:p></p>
        <p class="MsoNormal" style="text-indent:.5in">OR<o:p></o:p></p>
        <p class="MsoNormal">                &lt;fo:external-graphic
          src="tomcat.gif"/&gt;  <o:p></o:p></p>
        <p class="MsoNormal">                OR<o:p></o:p></p>
        <p class="MsoNormal">                &lt;fo:external-graphic
          src="../graphics/tomcat.gif"/&gt;  <o:p></o:p></p>
        <p class="MsoNormal">                …<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I have loaded the tomcat.gif at the various
          locations to match.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">However I do not think it is getting that
          far.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I have a customised configuration file and
          have set the base as follows:<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">&lt;base&gt;./&lt;/base&gt; <o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Can anyone help?<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Mar 14, 2018 12:06:34 PM
          org.apache.catalina.core.StandardWrapperValve invoke<o:p></o:p></p>
        <p class="MsoNormal">SEVERE: Servlet.service() for servlet
          [FopZ] in context with path [/fop] threw exception
          [javax.xml.transform.TransformerException:
          java.lang.NullPointerException] with root cause<o:p></o:p></p>
        <p class="MsoNormal">java.lang.NullPointerException<o:p></o:p></p>
        <p class="MsoNormal">                at
          java.io.FilterInputStream.markSupported(FilterInputStream.java:243)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.xmlgraphics.image.loader.util.ImageUtil.decorateMarkSupported(ImageUtil.java:213)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.xmlgraphics.image.loader.util.ImageUtil.autoDecorateInputStream(ImageUtil.java:228)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.createImageSource(AbstractImageSessionContext.java:373)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.access$100(AbstractImageSessionContext.java:53)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext$UnrestrictedFallbackResolver.createSource(AbstractImageSessionContext.java:364)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.newSource(AbstractImageSessionContext.java:94)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.needSource(AbstractImageSessionContext.java:191)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:123)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:123)<o:p></o:p></p>
        <p class="MsoNormal">                at
          org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:81)<o:p></o:p></p>
        <p class="MsoNormal">                at
          org.apache.fop.fo.FObj.processNode(FObj.java:126)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:291)<o:p></o:p></p>
        <p class="MsoNormal">                at
          org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179)<o:p></o:p></p>
        <p class="MsoNormal">                at
com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:208)<o:p></o:p></p>
        <p class="MsoNormal">                at
com.sun.org.apache.xml.internal.serializer.ToSAXHandler.flushPending(ToSAXHandler.java:281)<o:p></o:p></p>
        <p class="MsoNormal">                at
com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:247)<o:p></o:p></p>
        <p class="MsoNormal">                at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)<o:p></o:p></p>
        <p class="MsoNormal">                at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:183)<o:p></o:p></p>
        <p class="MsoNormal">                at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:351)<o:p></o:p></p>
        <p class="MsoNormal">                at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784)<o:p></o:p></p>
        <p class="MsoNormal">                at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)<o:p></o:p></p>
        <p class="MsoNormal">                at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)<o:p></o:p></p>
        <p class="MsoNormal">                at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)<o:p></o:p></p>
        <p class="MsoNormal">                at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)<o:p></o:p></p>
        <p class="MsoNormal">                at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)<o:p></o:p></p>
        <p class="MsoNormal">                at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)<o:p></o:p></p>
        <p class="MsoNormal">                at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)<o:p></o:p></p>
        <p class="MsoNormal">                at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:641)<o:p></o:p></p>
        <p class="MsoNormal">                at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:737)<o:p></o:p></p>
        <p class="MsoNormal">                at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:351)<o:p></o:p></p>
        <p class="MsoNormal">                at
          org.apache.fop.servlet.FopServletZ.render(FopServletZ.java:293)<o:p></o:p></p>
        <p class="MsoNormal">                at
          org.apache.fop.servlet.FopServletZ.renderFO(FopServletZ.java:232)<o:p></o:p></p>
        <p class="MsoNormal">                at
          org.apache.fop.servlet.FopServletZ.doGet(FopServletZ.java:169)<o:p></o:p></p>
        <p class="MsoNormal">                at
          javax.servlet.http.HttpServlet.service(HttpServlet.java:635)<o:p></o:p></p>
        <p class="MsoNormal">                at
          javax.servlet.http.HttpServlet.service(HttpServlet.java:742)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)<o:p></o:p></p>
        <p class="MsoNormal">                at
          org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)<o:p></o:p></p>
        <p class="MsoNormal">                at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)<o:p></o:p></p>
        <p class="MsoNormal">                at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)<o:p></o:p></p>
        <p class="MsoNormal">                at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)<o:p></o:p></p>
        <p class="MsoNormal">                at
          java.lang.Thread.run(Thread.java:745)<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-AU">Regards<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-AU"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-AU">Graeme
            Wellington<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-AU">Pro-Time
            Building Solutions Pty Ltd<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-AU">178
            Martin Road WALL FLAT SA 5254<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-AU">Mobile:
            0419 808 473<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-AU">Email:
            <a
              href="mailto:graeme.wellington@ptbuildingsolutions.com.au"
              moz-do-not-send="true">
              <span style="color:black">graeme.wellington@ptbuildingsolutions.com.au</span></a><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-AU"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-AU"><img
              style="width:3.75in;height:1.0625in" id="Picture_x0020_1"
              src="cid:part3.9D9536FD.5042B695@gmail.com"
              alt="PTBSX-Logo" class="" border="0" height="102"
              width="360"><o:p></o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>

Mime
View raw message