[Geoserver-users] White spaces are required between publicId and systemId

Hi

I have been having problem with rendering dynamic styles. I am using
geoserver as the rednering engine and OpenLayers as the front end UI. I am
trying to render the style for a particular layer dynamically.

So I have set the SLD attribute for a GetMap request to point to an action
deployed on my local tomcat, that returns a String of StyledLayerDescriptor
as the response, which is based entirely off the sample SLD that ship with
geoserver i.e. specifically simpleroads.sld.

I get the following exception

java.lang.RuntimeException: org.xml.sax.SAXParseException: White spaces are
required between publicId and systemId.
  at org.geotools.styling.SLDParser.parseSLD(SLDParser.java:364)
  at
org.geoserver.wms.kvp.GetMapKvpRequestReader.parseSld(GetMapKvpRequestReader.java:413)
  at
org.geoserver.wms.kvp.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:245)
  at org.geoserver.ows.Dispatcher.parseRequestKVP(Dispatcher.java:1001)
  at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:387)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:195)
....

Does anybody have any idea why this happens. I have read some posts about
setting the DTD to strict, but how do i do that for such dynamically
generated SLDs?

Thanks in advance for any help

Regards

Ajay Ravichandran
--
View this message in context: http://www.nabble.com/White-spaces-are-required-between-publicId-and-systemId-tp21632248p21632248.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi,

Looks like somehow the style being sent to geoserver is being transformed... perhaps some spaces being removed or something. Is there any way you can send us the request that is being made to geoserver?

ajayr wrote:

Hi

I have been having problem with rendering dynamic styles. I am using
geoserver as the rednering engine and OpenLayers as the front end UI. I am
trying to render the style for a particular layer dynamically.

So I have set the SLD attribute for a GetMap request to point to an action
deployed on my local tomcat, that returns a String of StyledLayerDescriptor
as the response, which is based entirely off the sample SLD that ship with
geoserver i.e. specifically simpleroads.sld.

I get the following exception

java.lang.RuntimeException: org.xml.sax.SAXParseException: White spaces are
required between publicId and systemId.
  at org.geotools.styling.SLDParser.parseSLD(SLDParser.java:364)
  at
org.geoserver.wms.kvp.GetMapKvpRequestReader.parseSld(GetMapKvpRequestReader.java:413)
  at
org.geoserver.wms.kvp.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:245)
  at org.geoserver.ows.Dispatcher.parseRequestKVP(Dispatcher.java:1001)
  at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:387)
  at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:195) ....

Does anybody have any idea why this happens. I have read some posts about
setting the DTD to strict, but how do i do that for such dynamically
generated SLDs?

Thanks in advance for any help

Regards

Ajay Ravichandran

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Hi Justin

thanks. Looks like the problem was that I was using OpenLayers and was setting the SLD attribute of the GetMap request to be an action that returned the response as text/xml i.e. String of , but it looks like the SLD attribute needs to return a response as a remote .sld file. I have changed it such that i pass in the string to the SLD_BODY attribute of the GetMap request, now it works beautifully.

thanks

Regards

Ajay Ravichandran

On Mon, Jan 26, 2009 at 6:33 PM, Justin Deoliveira <jdeolive@anonymised.com> wrote:

Hi,

Looks like somehow the style being sent to geoserver is being transformed… perhaps some spaces being removed or something. Is there any way you can send us the request that is being made to geoserver?

ajayr wrote:

Hi
I have been having problem with rendering dynamic styles. I am using
geoserver as the rednering engine and OpenLayers as the front end UI. I am
trying to render the style for a particular layer dynamically.
So I have set the SLD attribute for a GetMap request to point to an action
deployed on my local tomcat, that returns a String of StyledLayerDescriptor
as the response, which is based entirely off the sample SLD that ship with
geoserver i.e. specifically simpleroads.sld.
I get the following exception

java.lang.RuntimeException: org.xml.sax.SAXParseException: White spaces are
required between publicId and systemId.
at org.geotools.styling.SLDParser.parseSLD(SLDParser.java:364)
at
org.geoserver.wms.kvp.GetMapKvpRequestReader.parseSld(GetMapKvpRequestReader.java:413)
at
org.geoserver.wms.kvp.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:245)
at org.geoserver.ows.Dispatcher.parseRequestKVP(Dispatcher.java:1001)
at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:387)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:195) …

Does anybody have any idea why this happens. I have read some posts about
setting the DTD to strict, but how do i do that for such dynamically
generated SLDs?

Thanks in advance for any help

Regards

Ajay Ravichandran

Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.