[Geoserver-devel] [jira] (GEOS-5807) Absolute URI required for SVG's

Jonathan Moules created BugGEOS-5807
Absolute URI required for SVG’s

Issue Type:

BugBug

Affects Versions:

2.3.1

Assignee:

Andrea Aime

Components:

Validation

Created:

10/May/13 6:33 AM

Description:

The documentation makes it very clear in a lot of places that referencing a local SVG file should work (i.e. http://docs.geoserver.org/stable/en/user/styling/sld-extensions/pointsymbols.html#external-graphics ).

However, if I do this:

  1. It fails validation:
    “Parsing failed for ExternalGraphic: java.lang.IllegalArgumentException: URI is not absolute”

  2. If I submit it anyway, GeoServer chokes and fails to serve it (the file is there). I get a whole litany of errors:
    2013-05-10 12:25:36,071 WARN [geoserver.monitor] - Error handling request object
    java.lang.NullPointerException
    at org.geoserver.monitor.ows.wms.GetLegendGraphicHandler.getLayers(GetLegendGraphicHandler.java:27)
    at org.geoserver.monitor.ows.RequestObjectHandler.handle(RequestObjectHandler.java:48)
    at org.geoserver.monitor.ows.MonitorCallback.operationDispatched(MonitorCallback.java:93)
    at org.geoserver.ows.Dispatcher.fireOperationDispatchedCallback(Dispatcher.java:729)
    at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:724)
    at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:263)
    at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

2013-05-10 12:25:40,798 WARN [geotools.styling] - can’t parse boulderGeometry.svg as a java resource present in the classpath
2013-05-10 12:25:40,798 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: java.io.IOException
at org.geoserver.wms.legendgraphic.GetLegendGraphicKvpReader.read(GetLegendGraphicKvpReader.java:184)
at org.geoserver.wms.legendgraphic.GetLegendGraphicKvpReader.read(GetLegendGraphicKvpReader.java:60)
at org.geoserver.ows.Dispatcher.parseRequestKVP(Dispatcher.java:1412)
at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:622)


Caused by: java.io.IOException
at org.geoserver.catalog.Styles$Handler$2.parse(Styles.java:343)
at org.geoserver.catalog.Styles.parse(Styles.java:92)
at org.geoserver.catalog.ResourcePool.getStyle(ResourcePool.java:1490)
at org.geoserver.catalog.impl.StyleInfoImpl.getStyle(StyleInfoImpl.java:84)


Caused by: java.lang.RuntimeException: Parsing failed for ExternalGraphic: java.lang.IllegalArgumentException: URI is not absolute
at org.geotools.xml.impl.ParseExecutor.visit(ParseExecutor.java:164)
at org.geotools.xml.impl.BindingWalker$BindingExecutionChain.execute(BindingWalker.java:227)
at org.geotools.xml.impl.BindingWalker.walk(BindingWalker.java:186)
at org.geotools.xml.impl.ElementHandlerImpl.endElement(ElementHandlerImpl.java:236)

Caused by: java.lang.IllegalArgumentException: URI is not absolute
at java.net.URI.toURL(Unknown Source)
at org.geotools.sld.bindings.SLDExternalGraphicBinding.parse(SLDExternalGraphicBinding.java:117)

I like to think the documentation is correct. My attempt to read the SLD 1.0.0 spec doesn’t find anything about the URI needing to be absolute.

Our problem with requiring an absolute one, is that the SLD becomes much less portable across multiple systems.

Project:

GeoServer

Priority:

MajorMajor

Reporter:

Jonathan Moules

This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)