LiteRenderer runtime dependency on Batik

Description

Some modules don't build anymore because the class loader
wants Batik around when loading the LiteRenderer... can we
avoid having that dependency around? Not everybody is using
Batik, the LiteRenderer should classload without complaining
if you don't use svg. Yesterday I fixed a similar problem by removing a direct dependence on a Batik exception class, but I'm not sure how to fix this one...

This is what I get when I build arcgrid:

------------- Standard Output --------------- get a datasource org.geotools.data.arcgrid.ArcGridDataSource@199f91c
------------- ---------------- --------------- Testcase: testRenderImage(org.geotools.data.arcgrid.test.ArcGridRenderTest): Caused an ERROR
org/apache/batik/transcoder/image/ImageTranscoder
java.lang.NoClassDefFoundError: org/apache/batik/transcoder/image/ImageTranscoder
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at org.geotools.data.arcgrid.test.ArcGridRenderTest.renderImage(ArcGridRenderTest.java:134)
at org.geotools.data.arcgrid.test.ArcGridRenderTest.testRenderImage(ArcGridRenderTest.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

Environment

None

Activity

Show:
codehaus
April 10, 2015, 2:59 PM

CodeHaus Comment From: cholmes - Time: Sat, 17 Apr 2004 08:56:38 -0500
---------------------
Could we get this resolved soon? I'd like lite renderer for the upcoming release of geoserver, which I'd really like out on tuesday or so. Actually I'd like either renderer producing imsages, which I can't seem to get, all I can get with StyledRenderer is a big white screen. So I switched to lite since I had it working before, but it's given me nothing but grief. This batik dependancy is the latest, and I have no desire for svg support since we already have it w/o batik.

codehaus
April 10, 2015, 2:59 PM

CodeHaus Comment From: cholmes - Time: Sat, 17 Apr 2004 08:58:00 -0500
---------------------
Moved to critical. It's actually really a blocker for me in geoserver, but as that's not geotools I'm only doing to critical.

codehaus
April 10, 2015, 2:59 PM

CodeHaus Comment From: jmacgill - Time: Sat, 17 Apr 2004 16:20:47 -0500
---------------------
I've moved the svg glyph rendering code out into its own class, I still need to do more work to make this into a more generic plug-in system for different formats - but I will create a new issue for that.

The lite-rendering module is still dependent on batik, but the renderer itself is not, so unless a style includes a reference to an SVG graphic there should not be a problem.

codehaus
April 10, 2015, 2:59 PM

CodeHaus Comment From: jmacgill - Time: Sat, 17 Apr 2004 17:00:18 -0500
---------------------
> This batik dependancy is the latest, and I have no desire for svg support since we already have it w/o batik.

Just to clear up a possible missunderstanding, the batik dependancy is there so that SVG can be USED inside the renderer, not CREATED by it. i.e. this allows us to use svg documents as 'external graphics' in the same way that we can currently include gifs, jpegs and pngs. Without batik we do not have any way to support the rendering of svg icons or glyphs.

codehaus
April 10, 2015, 2:59 PM

CodeHaus Comment From: aaime - Time: Thu, 14 Sep 2006 05:02:45 -0500
---------------------
Fixed a long time ago... closing it

Assignee

Unassigned

Reporter

codehaus

Triage

None

Components

Priority

High
Configure