Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#23323 - [fop] has trouble with SVG graphics

Attached to Project: Community Packages
Opened by Andreas Baumann (andreas_baumann) - Friday, 18 March 2011, 08:40 GMT
Last edited by Stefan Husmann (stefanhusmann) - Tuesday, 22 March 2011, 18:49 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Stefan Husmann (stefanhusmann)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

When using 'fop' to convert a fop XML containing a SVG image into PDF,
I get the following:

xsltproc --nonet --xinclude output-pdf.xsl test.xml > test.fop
Making portrait pages on A4 paper (210mmx297mm)
fop -fo test.fop -pdf test.pdf
...
Mar 18, 2011 9:25:57 AM org.apache.fop.image.loader.batik.PreloaderSVG$Loader getImage
WARNING: Batik not in class path
java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGDocument
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.apache.batik.dom.svg.SVGDOMImplementation.createDocument(Unknown Source)
at org.apache.batik.dom.util.SAXDocumentFactory.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:767)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:626)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3103)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:922)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown Source)
at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown Source)
at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown Source)
at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createSVGDocument(Unknown Source)
at org.apache.fop.image.loader.batik.PreloaderSVG$Loader.getImage(PreloaderSVG.java:122)
at org.apache.fop.image.loader.batik.PreloaderSVG$Loader.access$100(PreloaderSVG.java:105)
at org.apache.fop.image.loader.batik.PreloaderSVG.preloadImage(PreloaderSVG.java:73)
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:123)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:282)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:171)
at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:204)
at com.sun.org.apache.xml.internal.serializer.ToSAXHandler.flushPending(ToSAXHandler.java:277)
at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:243)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:180)
at com.sun.org.apache.xerces.internal.xinclude.XIncludeHandler.emptyElement(XIncludeHandler.java:979)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:636)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:707)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:299)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
at org.apache.fop.cli.Main.startFOP(Main.java:174)
at org.apache.fop.cli.Main.main(Main.java:205)
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.svg.SVGDocument
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 65 more
Mar 18, 2011 9:25:58 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not available. URI: images/overview.svg. Reason: org.apache.xmlgraphics.image.loader.ImageException: The file format is not supported. No ImagePreloader found for images/overview.svg (See position 8:1696)
Mar 18, 2011 9:25:58 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/overview.svg. (No context info available)
Mar 18, 2011 9:25:59 AM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Line 1 of a paragraph overflows the available area by more than 50 points. (See position 10:23)
Mar 18, 2011 9:25:59 AM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Line 1 of a paragraph overflows the available area by more than 50 points. (See position 10:23)
Mar 18, 2011 9:25:59 AM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Line 1 of a paragraph overflows the available area by 10725 millipoints. (See position 10:23)
Mar 18, 2011 9:25:59 AM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Line 1 of a paragraph overflows the available area by 4725 millipoints. (See position 10:23)
Mar 18, 2011 9:25:59 AM org.apache.fop.fo.properties.PropertyMaker make
WARNING: span="inherit" on fo:block, but no explicit value found on the parent FO.

Additional info:
* package version(s):
fop 1.0-1
java-batik 1.7-8
java-commons-io 1.4-4
java-avalon-framework 4.2.0-4
java-commons-logging 1.1.1-3
java-xmlgraphics-commons 1.4-1

* config and/or log files etc.


Steps to reproduce:
pacman -S fop java-batik java-commons-io java-avalon-framework java-commons-logging java-xmlgraphics-commons libxslt docbook-xsl

make all (with supplied test package test.tgz)

Possible Solution:

add the following to /etc/fop.conf:

CLASSPATH="$CLASSPATH:/usr/share/java/batik/xml-apis-ext.jar"
(application/x-gzip)    test.tgz (1.7 KiB)
This task depends upon

Closed by  Stefan Husmann (stefanhusmann)
Tuesday, 22 March 2011, 18:49 GMT
Reason for closing:  Fixed
Comment by orbisvicis (orbisvicis) - Tuesday, 22 March 2011, 17:57 GMT
  • Field changed: Percent Complete (100% → 0%)
Why not put the new classpath directly in the fop.conf file? Now my fop.conf contains the classpath of the build system:
CLASSPATH="/opt/GNUstep/System/Library/Libraries/Java:/opt/GNUstep/Local/Library/Libraries/Java:/home/haawda/GNUstep/Library/Libraries/Java:/usr/share/java/batik/xml-apis-ext.jar"
I don't know if this is desirable or bad.

Loading...