Hi Thomas, sorry for my delayed answer:
This is my solution for forcing Batik to use Xerxes: JPEGTranscoder t = new JPEGTranscoder(); t.addTranscodingHint(JPEGTranscoder.KEY_XML_PARSER_CLASSNAME,"org.apache.xerces.parsers.SAXParser"); t.addTranscodingHint(JPEGTranscoder.KEY_XML_PARSER_VALIDATING,new Boolean(false)); t.addTranscodingHint(JPEGTranscoder.KEY_DOM_IMPLEMENTATION ,SVGDOMImplementation.getDOMImplementation()); Now I get this error when I use the class on the server: Mon Jan 31 09:40:52 CET 2005:<E> <ServletContext-General> Servlet failed with Exception java.lang.NoSuchMethodError at org.apache.batik.dom.util.SAXDocumentFactory.startElement(SAXDocumentFactory.java:471) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(SAXDocumentFactory.java:347) at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(SAXDocumentFactory.java:276) at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(SAXSVGDocumentFactory.java:158) at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(SAXSVGDocumentFactory.java:231) at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:118) at xinfo.quality.qfk.chart.QFKChart.save_as_jpeg(QFKChart.java:197) at xinfo.quality.qfk.chart.QFKChart.getQFKHistogramm(QFKChart.java:86) at jsp_servlet.__SimpleCall._jspService(__SimpleCall.java:161) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:941) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:905) at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:269) at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:391) at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:273) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129) It works when I use the class locally. Where should be something wrong with the libraries, but I'm using all the new versions of batik and xerxes. Does anybody have a suggestion? Thanks -----Ursprüngliche Nachricht----- Von: Thomas DeWeese [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 27. Januar 2005 12:07 An: Batik Users Cc: Bergjohann Erik, TG-52-M Betreff: Re: How to force Batik to use the Xerxes Parser when transforming from SVG to JPEG? Hi Christian, First off the default parser for Batik has been Xerces for a very long time. I really only mention this because since then there have been many improvements in Batik. The problem is that Batik doesn't use JAXP to pick it's parser (JAXP didn't exist when Batik was written). The way to change the parser is to modify or override the file: org/apache/batik/util/resources/XMLResourceDescriptor.properties You can either modify the one in batik (located under xml-batik/resources) or add one to your classpath ahead of the one included in 'batik-util.jar'. [EMAIL PROTECTED] wrote: > I've written a simple java-application which converts svg-files to jpeg files > using the batik transcoder api. > It works fine when I test it locally. > But when deploying it on the server (bea) I get the following error: > > java.io.IOException: SAX2 driver class > org.apache.crimson.parser.XMLReaderImpl not found > at > org.apache.batik.dom.util.SAXDocumentFactory.createDocument(SAXDocumentFactory.java:353) > at > org.apache.batik.dom.util.SAXDocumentFactory.createDocument(SAXDocumentFactory.java:276) > at > org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(SAXSVGDocumentFactory.java:158) > at > org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(SAXSVGDocumentFactory.java:231) > at > org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:118) > > I used System.setProperty("javax.xml.parsers.SAXParserFactory", > "org.apache.xerces.jaxp.SAXParserFactoryImpl"); > in order to force the processor to use Xerxes and not Crimson, but the error > still remains. > > Can someone give me a hint how to solve this problem? > > Thank you Christian > > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]