Hi Didier,
You could try launching Tomcat with -verbose option on your JVM to make
sure that the batik-awt-util.jar is being picked up.
I use JDK 1.4.2 for all my development. Maybe your Batik libraries were
compiled with a different JDK than FOP and there is some
incompatibility. If so you could try building your FOP and Batik jars
from source and testing again.
Good luck,
Adrian.
Didier Vandermaesen wrote:
Hello,
I am writing a servlet which is generating a PDF file upon request.
I am trying to include a SVG graphic in the PDF but an exception
occurs :
Jan 23, 2007 1:40:54 PM org.apache.fop.render.AbstractRenderer renderXML
SEVERE: Some XML content will be ignored. Could not render XML
java.lang.NoSuchFieldError: KEY_AVOID_TILE_PAINTING
at
org.apache.fop.svg.PDFGraphics2D.setPrivateHints(PDFGraphics2D.java:311)
...
I have looked in the sources of PDFGraphics2D.setPrinvateHints to see
why a problem can occur with the KEY_AVOID_TILE_PAINTING variable.
In the source, there is an import of
org.apache.batik.ext.awt.RenderingHintsKeyExt.
This package contains the static variable KEY_AVOID_TILE_PAINTING and
the file batik-awt-util.jar which provides it is present in my lib
directory. So I don't see why it isn't used correctly at run-time by the
PDFGraphics2D class.
I am using Apache Tomcat 5.5.20 - Batik 1.6 - FOP 0.93.
My Sun JDK is the 1.6.0 under Linux Fedora Core 6.
Does anyone has an idea?
Thanks,
Didier Vandermaesen