Style editor and GeoServer version

119 views
Skip to first unread message

Maël REBOUX

unread,
Jul 3, 2020, 3:11:49 AM7/3/20
to mapstore-users
Hello from britanny.

Which version of GeoServer is required to use the syle editor ?

When I try to edit a style : the layer disappear from my map. Normal : my GeoServer 2.12-5 return to me a java error :

<?xml version="1.0" encoding="UTF-8"?><ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc /geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd">
<ServiceException>
java.io.IOException: java.lang.RuntimeException: Parsing failed for StyledLayerDescriptor: java.lang.NullPointerException
java.lang.RuntimeException: Parsing failed for StyledLayerDescriptor: java.lang.NullPointerException
Parsing failed for StyledLayerDescriptor: java.lang.NullPointerException
</ServiceException></ServiceExceptionReport>

Best regards,

Maël

Stefano Bovio

unread,
Jul 3, 2020, 4:30:17 AM7/3/20
to mapstor...@googlegroups.com
Hello Maël,

Thanks for reporting this issue,
we are currently using MapStore style editor with GeoServer 2.16 but we tested it also with the 2.12 version.

The error is showing a parsing error of the style,
if possible could you please share the style and the steps you did while editing it,
so we can double check it?
eg:
- style format: SLD or CSS?
- if SLD which version?
- did you copy and paste a new style replacing the one in the textarea or did you edit an existing style?

Thanks,

Stefano

--
You received this message because you are subscribed to the Google Groups "mapstore-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapstore-users/d76b0cb5-549e-4547-b9d7-ab1365a05231o%40googlegroups.com.


--

Regards,

Stefano Bovio

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.

==

Stefano Bovio

Digital Cartographer - UI/UX Designer


GeoSolutions S.A.S.

Via di Montramito 3/A

55054  Massarosa (LU)

Italy

phone: +39 0584 962313

fax:     +39 0584 1660272


http://www.geo-solutions.it

http://twitter.com/geosolutions_it


-------------------------------------------------------


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

Maël REBOUX

unread,
Jul 3, 2020, 6:14:10 AM7/3/20
to mapstor...@googlegroups.com

OK. I made more tests.

Below my steps. I reproduced this 3 times.

 

 

I have a map then loaded the layer directly from the GeoServer.

 

 

1 : mapstore 2 do a GET to retrieve the current style of the layer

https://myportal.fr/geoserver/rest/workspaces/ref_fonds_v2/styles/zone_activite.sld

HTTP 200 (OK)

 

2 : the do a POST for create a new style derived from the SLD model stored somewhere in the mapstore config

(note : why a new style ? I asked to edit the current syle ? for allow undo ?)

https://myportal.fr/geoserver/rest/styles.json?name=c78a9a50-bd0f-11ea-894d-8953cb200962_ms_1593768605813

HTTP 201 (created)

 

3 : then do a PUT with the current style retrieved in  step 1.

https://myportal.fr/geoserver/rest/styles/c78a9a50-bd0f-11ea-894d-8953cb200962_ms_1593768605813?raw=true

HTTP 200 OK

 

4 : the do a GetImage (no tiled) to refresh the map

https://myportal.fr/geoserver/ref_fonds_v2/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=zone_activite&STYLES=c78a9a50-bd0f-11ea-894d-8953cb200962_ms_1593768605813&SRS=EPSG%3A3857&CRS=EPSG%3A3857&TILED=false&_v_=1593768605813&WIDTH=1920&HEIGHT=957&BBOX=-203074.074896642%2C6106754.8369019795%2C-166384.30131975742%2C6125042.3959192075

[HTTP/1.1 200 OK 45ms]

 

REPONSE :

<?xml version="1.0" encoding="UTF-8"?><ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc https://myportal.fr/geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd">   <ServiceException code="StyleNotDefined">

      No such style: c78a9a50-bd0f-11ea-894d-8953cb200962_ms_1593768605813

</ServiceException></ServiceExceptionReport>

 

=> ok we have 2 GeoServer load-balanced. Waiting the refresh....

 

5. 30 s later : it works : I get an image

 

 

6. modification of the style in mapStore2

PUT https://myportal.fr/geoserver/rest/styles/c78a9a50-bd0f-11ea-894d-8953cb200962_ms_1593768605813

HTTP 200 OK

 

7. GetImage -> error

https://myportal.fr/geoserver/ref_fonds_v2/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=zone_activite&STYLES=c78a9a50-bd0f-11ea-894d-8953cb200962_ms_1593768605813&SRS=EPSG%3A3857&CRS=EPSG%3A3857&TILED=false&_v_=1593768605813&WIDTH=1920&HEIGHT=957&BBOX=-203074.074896642%2C6106754.8369019795%2C-166384.30131975742%2C6125042.3959192075

HTTP 200 but error

 

<?xml version="1.0" encoding="UTF-8"?><ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc https://myportal.fr/geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd">   <ServiceException>

java.io.IOException: java.lang.RuntimeException: Parsing failed for StyledLayerDescriptor: java.lang.NullPointerException

java.lang.RuntimeException: Parsing failed for StyledLayerDescriptor: java.lang.NullPointerException

Parsing failed for StyledLayerDescriptor: java.lang.NullPointerException

</ServiceException></ServiceExceptionReport>

 

The style in the UI style editor on the GeoServer :

 

<?xml version="1.0" encoding="UTF-8"?><sld:StyledLayerDescriptor xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:se="http://www.opengis.net/se" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:sld="http://www.opengis.net/sld">org.geotools.styling.StyledLayerDescriptorImpl@763b1c69</sld:StyledLayerDescriptor>

 

 

We have some filtering security equipements. But as write upper : the current style has already be sent one time without crash.

 

 

Below the StyleEncoding. Simply want to change the fill color from grey to red.

 

<?xml version="1.0" encoding="UTF-8"?>

<!--

 

  nom du SLD : zone_activite

 

  couche source dans la base :  economie.v_za

  layer cible du style       :  ref_fonds_v2:zone_activite

 

  objet : style par défaut

 

  Historique des versions :

  date        |  auteur              |  description

  02/07/2020  |  S GELIN            |  version initiale

 

-->

<StyledLayerDescriptor version="1.1.0"

                       xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"

                       xmlns="http://www.opengis.net/sld"

                       xmlns:ogc="http://www.opengis.net/ogc"

                       xmlns:se="http://www.opengis.net/se"

                       xmlns:xlink="http://www.w3.org/1999/xlink"

                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <NamedLayer>

    <se:Name>Zone d'activité</se:Name>

    <UserStyle>

      <se:Name>Zone d'activité</se:Name>

      <se:FeatureTypeStyle>

        <se:Rule>

          <se:Name>Single symbol</se:Name>

          <se:MinScaleDenominator>0</se:MinScaleDenominator>

          <se:MaxScaleDenominator>100000</se:MaxScaleDenominator>

          <se:PolygonSymbolizer>

            <se:Fill>

              <se:SvgParameter name="fill">#bbbbbd</se:SvgParameter>

            </se:Fill>

          </se:PolygonSymbolizer>

        </se:Rule>

      </se:FeatureTypeStyle>

    </UserStyle>

  </NamedLayer>

</StyledLayerDescriptor>

 

 

De : mapstor...@googlegroups.com [mailto:mapstor...@googlegroups.com] De la part de Stefano Bovio
Envoyé : vendredi 3 juillet 2020 10:30
À : mapstor...@googlegroups.com
Objet : [NEWSLETTER] Re: [mapstore-users] Style editor and GeoServer version

Maël REBOUX

unread,
Jul 6, 2020, 4:36:54 AM7/6/20
to mapstor...@googlegroups.com

Hi Stefano

 

We made more tests and we can exclude our firewall / security equipments.

 

After that I noticed a difference between the step 3 and the step 6. The single difference is the « ?raw=true » at the end of the url

When playing / testing the the RESTED plugin in FireFox and testing the same url with and without « ?raw=true » I can reproduced the bug.

 

So, in conclusion I think MapStore2 should add the « ?raw=true » string at the end systematically.

 

So I opened this issue :  https://github.com/georchestra/mapstore2-georchestra/issues/254

 

 

 

De : mapstor...@googlegroups.com [mailto:mapstor...@googlegroups.com] De la part de Maël REBOUX
Envoyé : vendredi 3 juillet 2020 12:14
À : mapstor...@googlegroups.com
Objet : [NEWSLETTER] RE: Re: [mapstore-users] Style editor and GeoServer version

--

You received this message because you are subscribed to the Google Groups "mapstore-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapstore-user...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages