[ 
https://issues.apache.org/jira/browse/FOP-2241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13640156#comment-13640156
 ] 

Daniela Kruse commented on FOP-2241:
------------------------------------

I can not reproduce the issue from command line because for it to be 
reproducable, I have to replace the UriResolver which I can do only if I embed 
it.
                
> Plugin for PDF-embedding does not support custom UriResolver
> ------------------------------------------------------------
>
>                 Key: FOP-2241
>                 URL: https://issues.apache.org/jira/browse/FOP-2241
>             Project: Fop
>          Issue Type: Bug
>          Components: images
>    Affects Versions: 1.1
>         Environment: Linux, but should not matter
>            Reporter: Daniela Kruse
>
> http://svn.apache.org/repos/asf/xmlgraphics/fop-pdf-images/trunk/src/java/org/apache/fop/render/pdf/pdfbox/PreloaderPDF.java
> This class seems not to support the custom uri loader set on creation: 
> setURIResolver(new DatafileURIResolver(fopFactory.getURIResolver()));
> Resulting stack trace is:
> ERROR:  ''
> javax.xml.transform.TransformerException: java.lang.NullPointerException
>       at 
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:736)
>       at 
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:340)
>       at ch.invoca.represent.fop.Fo2PDF.convertFO2PDF(Fo2PDF.java:82)
>       at 
> ch.invoca.bapi.delivery.post.PostBarcodeHelper.integratePdfFO(PostBarcodeHelper.java:452)
>       at 
> ch.invoca.bapi.delivery.post.PostBarcodeHelper.main(PostBarcodeHelper.java:607)
> Caused by: java.lang.NullPointerException
>       at 
> org.apache.fop.datatypes.URISpecification.getURL(URISpecification.java:47)
>       at 
> org.apache.fop.datatypes.URISpecification.escapeURI(URISpecification.java:117)
>       at 
> org.apache.fop.render.pdf.pdfbox.PreloaderPDF.deriveDocumentURI(PreloaderPDF.java:95)
>       at 
> org.apache.fop.render.pdf.pdfbox.PreloaderPDF.loadPDF(PreloaderPDF.java:110)
>       at 
> org.apache.fop.render.pdf.pdfbox.PreloaderPDF.preloadImage(PreloaderPDF.java:83)
>       at 
> org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.java:175)
>       at 
> org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:128)
>       at 
> org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:122)
>       at org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:81)
>       at org.apache.fop.fo.FObj.processNode(FObj.java:124)
>       at 
> org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:280)
>       at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:175)
>       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:606)
>       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:353)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
>       at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
>       at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>       at 
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
>       at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
>       at 
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:631)
>       at 
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:727)
>       ... 4 more
> ---------
> java.lang.NullPointerException
>       at 
> org.apache.fop.datatypes.URISpecification.getURL(URISpecification.java:47)
>       at 
> org.apache.fop.datatypes.URISpecification.escapeURI(URISpecification.java:117)
>       at 
> org.apache.fop.render.pdf.pdfbox.PreloaderPDF.deriveDocumentURI(PreloaderPDF.java:95)
>       at 
> org.apache.fop.render.pdf.pdfbox.PreloaderPDF.loadPDF(PreloaderPDF.java:110)
>       at 
> org.apache.fop.render.pdf.pdfbox.PreloaderPDF.preloadImage(PreloaderPDF.java:83)
>       at 
> org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.java:175)
>       at 
> org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:128)
>       at 
> org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:122)
>       at org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:81)
>       at org.apache.fop.fo.FObj.processNode(FObj.java:124)
>       at 
> org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:280)
>       at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:175)
>       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:606)
>       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:353)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
>       at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
>       at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>       at 
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
>       at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
>       at 
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:631)
>       at 
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:727)
>       at 
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:340)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to