SVG in PDF : KEY_AVOID_TILE_PAINTING Exception

2007-01-23 Thread Didier Vandermaesen
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 


-- 
Didier Vandermaesen
IT Manager
Arlenda S.A.
Avenue de l'Hopital 1, Bat. B36
B-4000 Liège
Belgium
Visit : www.arlenda.com


Re: SVG in PDF : KEY_AVOID_TILE_PAINTING Exception

2007-01-23 Thread Adrian Cumiskey

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 







Re: SVG in PDF : KEY_AVOID_TILE_PAINTING Exception

2007-01-23 Thread Didier Vandermaesen
Hi Adrian,

Well done, in fact I was loading batik-1.5 instead of the 1.6 as I
thought.
It was an error I made when compiling the project with ant : the project
was not well refreshed and there was an old version remaining in my lib
directory. Actually, classes of Batik 1.5 were conflicting with some of
the Batik 1.6 version.

You opened my eyes with the -verbose option.

It is well running with the new JDK 6.

Thanks a lot.

Didier

On Tue, 2007-01-23 at 15:06 +, Adrian Cumiskey wrote:
 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