Hi again...I apologize for the duplication, but I sent this over the weekend and it seems to have been somehow overlooked. Any opinions would be greatly appreciated!
Thanks again. Marshall On Sun, Mar 30, 2008 at 3:05 PM, Marshall Flax <[EMAIL PROTECTED]> wrote: > Currently, the svgplugin for Eclipse > (http://sourceforge.net/projects/svgplugin/) -- includes Batik 1.5.1. > I'm trying to get it to work against a more up-to-date version of > Batik. What I've found is that essentially no work is required to use > Batik 1.6 with svgplugin, but that 1.7 (and TRUNK) Batik both give a > null-pointer exception in > org.apache.batik.dom.util.SAXDocumentFactory.startElement() -- > apparently because createDocument() is never called. This results in a > stack trace (Europa Eclipse, 1.5 OSX 10.4) like > > 2008-03-30 14:58:45.161 java[4905] [Java CocoaComponent compatibility > mode]: Enabled > 2008-03-30 14:58:45.161 java[4905] [Java CocoaComponent compatibility > mode]: Setting timeout for SWT to 0.100000 > java.lang.NullPointerException > at > org.apache.batik.dom.util.SAXDocumentFactory.startElement(SAXDocumentFactory.java:564) > at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown > Source) > at org.apache.xerces.impl.dtd.XMLDTDValidator.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.DTDConfiguration.parse(Unknown Source) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown > Source) > at > com.dlsc.batik.viewer.EclipseSAXSVGDocumentFactory.createDocument(EclipseSAXSVGDocumentFactory.java:41) > at > org.apache.batik.dom.util.SAXDocumentFactory.createDocument(SAXDocumentFactory.java:349) > at > org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(SAXSVGDocumentFactory.java:200) > at > org.apache.batik.dom.svg.SAXSVGDocumentFactory.createSVGDocument(SAXSVGDocumentFactory.java:124) > at > org.apache.batik.bridge.DocumentLoader.loadDocument(DocumentLoader.java:106) > at > org.apache.batik.swing.svg.SVGDocumentLoader.run(SVGDocumentLoader.java:84) > > However, a simple patch like > Index: sources/org/apache/batik/dom/util/SAXDocumentFactory.java > =================================================================== > --- sources/org/apache/batik/dom/util/SAXDocumentFactory.java (revision > 640199) > +++ sources/org/apache/batik/dom/util/SAXDocumentFactory.java (working > copy) > @@ -557,7 +557,7 @@ > throw new SAXException(new InterruptedIOException()); > } > > - if (inProlog) { > + if (inProlog && parser != null) { > inProlog = false; > try { > isStandalone = parser.getFeature > > is sufficient to get it working. > > Now here's my question: is SAXDocumentFactory being too picky (i.e. is > the patch correct), or is svgplugin skipping some essential step (i.e. > does svgplugin need to change instead)? I'm afraid I don't understand > either codebase enough to answer this. Any suggestions? > > Thanks! > > Marshall >
