[Geoserver-devel] Issue on SLD editor

Dear all,
I want to signal an issue that is preventing to edit style from UI. Seems that it is caused by modifications to the SLDHanlder occured in this pr https://github.com/geoserver/geoserver/commit/76cda92450691cebc30c85fb3f5ac1cbf91c3596#diff-c94ec07f3c4d55a86727f5e790aaf2c78ed8423712af04717cab6b74f5d82d75.
Details are on the Jira ticket https://osgeo-org.atlassian.net/browse/GEOS-10013.

Best regards,
Marco Volpini

Adding further details here from the jira ticket for easier reference:

When editing a style from the UI when save or validate is pressed the editor returns “Mark invalid”.
The problem lies in the SLD handler when the style version is read. Although the reader stop after the version number is found, the reset method called later on the BufferedReader throws exception as if the XML_LOOKAHEAD value is not sufficient.
https://github.com/geoserver/geoserver/blob/76cda92450691cebc30c85fb3f5ac1cbf91c3596/src/main/src/main/java/org/geoserver/catalog/SLDHandler.java#L338

Since a previously working style now is failing seems that the issue has been introduced with this pullrequest https://github.com/geoserver/geoserver/commit/76cda92450691cebc30c85fb3f5ac1cbf91c3596#diff-c94ec07f3c4d55a86727f5e790aaf2c78ed8423712af04717cab6b74f5d82d75 that refact the existing code to use the XMLStreamReader instead of the the XMLPullParser.

This is the StyledLayerDescriptor element that I’ve defined

<sld:StyledLayerDescriptor version=“1.0.0” xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml">

Best regards,

Marco Volpini

Il giorno gio 8 apr 2021 alle ore 11:00 Marco Volpini <marco.volpini@anonymised.com> ha scritto:

Dear all,
I want to signal an issue that is preventing to edit style from UI. Seems that it is caused by modifications to the SLDHanlder occured in this pr https://github.com/geoserver/geoserver/commit/76cda92450691cebc30c85fb3f5ac1cbf91c3596#diff-c94ec07f3c4d55a86727f5e790aaf2c78ed8423712af04717cab6b74f5d82d75.
Details are on the Jira ticket https://osgeo-org.atlassian.net/browse/GEOS-10013.

Best regards,
Marco Volpini