Hello,

I've hit a problem with Batik which I cannot find a solution to.

I'm using Batik to convert an SVG file to PNG format. I'm using the most
recent version of Batik, which I downloaded yesterday from
http://xmlgraphics.apache.org/batik/download.cgi.

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 code which causes the error is the last line in the snippet
reproduced below. I've included it here to show what I'm doing, which is
to supply an InputStream of text and convert it into an XML document.

InputStream amendedStream = new
ByteArrayInputStream(fileContents.toString().getBytes());
String parser = XMLResourceDescriptor.getXMLParserClassName();
SAXSVGDocumentFactory documentFactory = new
SAXSVGDocumentFactory(parser);
Document document =
documentFactory.createDocument(SVGDOMImplementation.SVG_NAMESPACE_URI,
amendedStream);

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.

Many thanks in advance for any thoughts or assistance,

Mark

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

  • [no subject] Harris, Mark C
    • Re: thomas . deweese

Reply via email to