i am just beginning to work with batik, and have a couple of problems. one of the problems regards to the TranscodingHintKey... maybe i explain first: i am working with apache cocoon 2.0.1. my goal is to define a pipeline, which contains a custom generator (calculating diagram informations), the generated xml is transformed to svg via xsl and then rendered as jpeg (or png whatever), using the svg2jpeg serializer. the problem is that i have to restart the server, if i re-deploy the application. it doesn't matter wheter i use tomcat 3.2.4 standalone or in combination with jboss 2.2.2. the origin of the problem seems to be:
<code> final class TranscodingHintKey extends RenderingHints.Key { TranscodingHintKey() { super(10100); } </code> because i get the error message: <snip> java.lang.ExceptionInInitializerError: java.lang.IllegalArgumentException: Instance(10100) of org.apache.batik.ext.awt.TranscodingHintKey already registered at java.awt.RenderingHints$Key.recordIdentity(RenderingHints.java:45) at java.awt.RenderingHints$Key.<init>(RenderingHints.java:64) at org.apache.batik.ext.awt.TranscodingHintKey.<init>(Unknown Source) at org.apache.batik.ext.awt.RenderingHintsKeyExt.<clinit>(Unknown Source) </snip> while RenderingHints.Key has only unique instances, the (second) instantiation of the TranscodingHintKey results in the exception. by the way: this exception does not just occur when re-deploying an application, it gets also thrown, if you access batik from two different applications; example: the cocoon/hello.svg and a custom application myapp/diagram.svg. the second call results in that exception. while i am not familiar with the java.awt.RenderingHints class, it should be possible to use a singleton like pattern, to return the existing TranscodingHintKey instance, if it exists. i am looking for a solution, but any help would be appreciated! thank you, moritz. p.s.: currently i am using mac os x 10.1.3, jdk 1.3.1 on a powerbook g4. but i know that this problem also happens with a win2k operating system. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]