Closed terjeros closed 8 years ago
SAXSVGDocumentFactory path has been changed in batik. This patch works for me:
--- ditaa-0.10.orig/src/org/stathissideris/ascii2image/graphics/ImageHandler.java 2015-07-13 18:25:29.000000000 +0200
+++ ditaa-0.10/src/org/stathissideris/ascii2image/graphics/ImageHandler.java 2016-01-30 14:37:06.643519439 +0100
@@ -42,7 +42,7 @@
import org.apache.batik.bridge.BridgeContext;
import org.apache.batik.bridge.GVTBuilder;
import org.apache.batik.bridge.UserAgentAdapter;
-import org.apache.batik.dom.svg.SAXSVGDocumentFactory;
+import org.apache.batik.anim.dom.SAXSVGDocumentFactory;
import org.apache.batik.dom.util.DocumentFactory;
import org.apache.batik.ext.awt.image.codec.PNGEncodeParam;
import org.apache.batik.ext.awt.image.codec.PNGImageEncoder;
diff -Naur ditaa-0.10.orig/src/org/stathissideris/ascii2image/graphics/OffScreenSVGRenderer.java ditaa-0.10/src/org/stathissideris/ascii2image/graphics/OffScreenSVGRenderer.java
--- ditaa-0.10.orig/src/org/stathissideris/ascii2image/graphics/OffScreenSVGRenderer.java 2015-07-13 18:25:29.000000000 +0200
+++ ditaa-0.10/src/org/stathissideris/ascii2image/graphics/OffScreenSVGRenderer.java 2016-01-30 14:37:06.643519439 +0100
@@ -29,7 +29,7 @@
import org.apache.batik.bridge.BridgeContext;
import org.apache.batik.bridge.GVTBuilder;
import org.apache.batik.bridge.UserAgentAdapter;
-import org.apache.batik.dom.svg.SAXSVGDocumentFactory;
+import org.apache.batik.anim.dom.SAXSVGDocumentFactory;
import org.apache.batik.gvt.GraphicsNode;
import org.apache.batik.gvt.renderer.ConcreteImageRendererFactory;
import org.apache.batik.gvt.renderer.ImageRenderer;
Thanks for pointing it out. I've upgraded Batik to 1.8 and merged the changes. Also fixed the release build script.
After fix of CVE-2015-0250 in batik: https://xmlgraphics.apache.org/batik/download.html
ditaa seems to fail to build, here is log:
[javac] Compiling 33 source files to /builddir/build/BUILD/ditaa-0.10/jar-temp [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6 [javac] /builddir/build/BUILD/ditaa-0.10/src/org/stathissideris/ascii2image/graphics/ImageHandler.java:45: error: cannot find symbol [javac] import org.apache.batik.dom.svg.SAXSVGDocumentFactory; [javac] ^ [javac] symbol: class SAXSVGDocumentFactory [javac] location: package org.apache.batik.dom.svg [javac] /builddir/build/BUILD/ditaa-0.10/src/org/stathissideris/ascii2image/graphics/OffScreenSVGRenderer.java:32: error: cannot find symbol [javac] import org.apache.batik.dom.svg.SAXSVGDocumentFactory; [javac] ^ [javac] symbol: class SAXSVGDocumentFactory [javac] location: package org.apache.batik.dom.svg [javac] /builddir/build/BUILD/ditaa-0.10/src/org/stathissideris/ascii2image/core/JavadocTaglet.java:90: warning: non-varargs call of varargs method with inexact argument type for last parameter; [javac] Method configurationMethod = htmlDoclet.getClass().getMethod("configuration", null); [javac] ^ [javac] cast to Class<?> for a varargs call [javac] cast to Class<?>[] for a non-varargs call and to suppress this warning [javac] /builddir/build/BUILD/ditaa-0.10/src/org/stathissideris/ascii2image/core/JavadocTaglet.java:91: warning: non-varargs call of varargs method with inexact argument type for last parameter; [javac] Object config = configurationMethod.invoke(htmlDoclet, null); [javac] ^ [javac] cast to Object for a varargs call [javac] cast to Object[] for a non-varargs call and to suppress this warning [javac] /builddir/build/BUILD/ditaa-0.10/src/org/stathissideris/ascii2image/graphics/OffScreenSVGRenderer.java:55: error: cannot find symbol [javac] SAXSVGDocumentFactory df = new SAXSVGDocumentFactory("org.apache.xerces.parsers.SAXParser"); [javac] ^ [javac] symbol: class SAXSVGDocumentFactory [javac] location: class OffScreenSVGRenderer [javac] /builddir/build/BUILD/ditaa-0.10/src/org/stathissideris/ascii2image/graphics/OffScreenSVGRenderer.java:55: error: cannot find symbol [javac] SAXSVGDocumentFactory df = new SAXSVGDocumentFactory("org.apache.xerces.parsers.SAXParser"); [javac] ^ [javac] symbol: class SAXSVGDocumentFactory [javac] location: class OffScreenSVGRenderer [javac] /builddir/build/BUILD/ditaa-0.10/src/org/stathissideris/ascii2image/graphics/OffScreenSVGRenderer.java:67: error: cannot find symbol [javac] SAXSVGDocumentFactory df = new SAXSVGDocumentFactory("org.apache.xerces.parsers.SAXParser"); [javac] ^ [javac] symbol: class SAXSVGDocumentFactory [javac] location: class OffScreenSVGRenderer [javac] /builddir/build/BUILD/ditaa-0.10/src/org/stathissideris/ascii2image/graphics/OffScreenSVGRenderer.java:67: error: cannot find symbol [javac] SAXSVGDocumentFactory df = new SAXSVGDocumentFactory("org.apache.xerces.parsers.SAXParser"); [javac] ^ [javac] symbol: class SAXSVGDocumentFactory [javac] location: class OffScreenSVGRenderer