"Massimiliano Cuccia" <[EMAIL PROTECTED]> wrote:
> > > Uncaught exception (java.lang.ExceptionInInitializerError)
> > >  
> > >  SVGElementMapping.setupSVG()
> > >  SVGElementMapping.addToBuilder(TreeBuilder)
> > Do you have Batik in the classpath? 
> YES, it is.
> >If so, it is the version taken from the FOP distribution? 
> SURE!!
> I don't understand ... the code is simple and small
> I thing that something is missing ... some initialization ...
> any idea??

Ok. From the Java doc:
 java.lang.ExceptionInInitializerError: Signals that an unexpected
 exception has occurred in a static initializer.
You stacktrace indicates this happens in 
The code is (comments trimmed)
     private static synchronized void setupSVG() {
        if(foObjs == null) {
            foObjs = new HashMap();
            foObjs.put("svg", SVGElement.maker());
            foObjs.put("rect", SVGObj.maker("rect"));
          ... lots of foObjs.put ...
It uses the class org.apache.batik.util.XMLResourceDescriptor,
which happens to have a static initializer:
    static {
        bundle = ResourceBundle.getBundle(RESOURCES, Locale.getDefault());
This could cause the above mentioned exception, the other stuff
doesn't seem to do this.
Ergo: something went wrong during loading of the ressource.
What's going wrong is hard to guess. Usually, it's a deployment
problem. However, you seem to run an unusual JVM. Locale.getDefault()
could return an unusual value, perhaps null. If this is the case,
you're hosed, complain to the vendor of your JVM. I'm not familiar
enough with the failure modes of RessourceBundle.getBundle() to
hazard a guess what else could have happened. If you can run the
stuff in a debugger, you might be able to deduce it yourself.
Otherwise, I'd recommend downloading the source for Batik 1.1
(actually which *is* the version of Batik shipped with 0.20.3?)
insert some printlns for debugging in the code and see what

Batik seems to be somewhat overzealous in early loading all kinds
of stuff all over the place. Someone out there with enough positive
standing with the Batik people to tell them to do something about


To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to