On Wednesday 23 May 2001 02:40, Diwakar Mantha wrote:
> Hi,
>
> I am trying to transcode an SVG string into JPEG format, inside a servlet.
> I have not been able to get this working in Tomcat 3.2.1, JRun 3.1beta and
> JRun 3.01.  I have appended the Tomcat error, but it is the same
> NoSuchMethodError that is mentioned in the Batik FAQ.  It seems to be due
> to a conflicting DOM API Java binding that the servlet container uses.  It
> may not be a good idea to override the servlet container's jar files,
> because it may affect the container functionality.  The only viable option
> seems to be that I should use the container's parser for the Transcoder. 
> All the three web servers I mentioned have jaxp.jar and parser.jar (Sun
> parser) in their lib/ext directories.  I do realize that I have not given
> the jaxp version, and I don't know the versions that the containers are
> using.  I have to experiment a bit.
>
> Question 1: How do I do this?  Has anyone got this working with the Sun
> parser?  Can someone please give me a concrete example by filling in the
> blank below,

We are using crimson. Your exception seems to be a DOM Binding problem. You 
are tyring to call a DOM Level 1 method with the parameters of a DOM Level 2 
method. eg: createDocument vs. createDocumentNS.

Batik needs to work with the DOM Level 2 Binding (which are part of the batik 
archive) - so you will probably have to change your classpath bu putting the 
batik .jar files first.

> t.addTranscodingHint(JPEGTranscoder.KEY_XML_PARSER_CLASSNAME, "<what goes
> here??>");
> Question 2: Any better solutions for using Batik in a servlet container
> without hacking the container's 'built-in' classpath?

This hints is not required anymore. It can be used if you want to use your 
won XML parser (instead of crimson - the one used natively in batik).

Thierry.


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

Reply via email to