Hi Mark, "Harris, Mark C" <[email protected]> wrote on 02/25/2009 03:49:18 AM:
> When I run the Java class which does the conversion using Batik on my > local PC (Java version 1.4.2_04), it works perfectly well and produces > the PNG file as expected. > > The problem occurs when I deploy the Java class onto a Unix server (Java > version 1.4.2_15). I get this error: > java.lang.NoSuchMethodError: > org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Ljava/lang > /String;Ljava/io/InputStream;)Lorg/apache/batik/dom/svg/SVGOMDocument; > at <package path>.SVGToPNGPIService.readUncompressedSVG(SVGToPNGPIService.java:398) The JVM on the Unix Server probably has an 'old' version of Batik someplace very early on the classpath. There are a couple of 'enterpise' applications that leverage Batik for certain things. > I've re-installed the Batik libraries I've used on my local PC onto the > server in the appropriate lib directory (including all the xalan and > xerces ones from the unzipped batik-1.7/lib directory) and it has made > no difference; I get the same error. You might be able to track down the other Batik lib by getting the Class object for SAXSVGDocumentFactory and printing it's ClassLoader. In theory you should be able to use a custom class loader to access your preferred Batik library if you wanted to go down that path.
