Can I please ask you developers:

What would the best approach to fixing this be?

   -

   Upon loading the configuration, automatically remove a *null *style if
   the file (pophatch.xml) cannot be found/read - perhaps with a warning in a
   log file?
   -

   Give the user an explicit error message when rendering the UI and a *null
   *style is found?


Thanks

Peter

On Wed, 30 Sep 2020 at 20:57, Peter Smythe (JIRA) <
[email protected]> wrote:

> Peter Smythe
> <https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=5b3b4ba74e83c12dd31159d6>
> *created* an issue
>
> GeoServer
> <https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiYjI1MWRjZDczNzdkNDcxNzlmOTg1ODBlYzQ3NjY4MGIiLCJwIjoiaiJ9>
> / [image: Bug]
> <https://osgeo-org.atlassian.net/browse/GEOS-9756?atlOrigin=eyJpIjoiYjI1MWRjZDczNzdkNDcxNzlmOTg1ODBlYzQ3NjY4MGIiLCJwIjoiaiJ9>
> GEOS-9756
> <https://osgeo-org.atlassian.net/browse/GEOS-9756?atlOrigin=eyJpIjoiYjI1MWRjZDczNzdkNDcxNzlmOTg1ODBlYzQ3NjY4MGIiLCJwIjoiaiJ9>
> Layer configured with missing style throws NPE
> <https://osgeo-org.atlassian.net/browse/GEOS-9756?atlOrigin=eyJpIjoiYjI1MWRjZDczNzdkNDcxNzlmOTg1ODBlYzQ3NjY4MGIiLCJwIjoiaiJ9>
> Issue Type: [image: Bug] Bug
> Affects Versions: 2.17.2
> Assignee: Unassigned
> Created: 30/Sep/20 8:54 PM
> Environment:
>
> Steps to reproduce:
>
> Using the default install, rename pophatch.xml to pophatch.xml.break and
> reload the configuration or restart GeoServer
> Click Tile Caching > Tile Layers - throws:
>
> org.apache.wicket.WicketRuntimeException: Error attaching this container
> for rendering: [OddEvenItem [Component id = 8]]
> at
> org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1848)
> ...
> Caused by: java.lang.*NullPointerException*
> at org.geoserver.gwc.layer.*StyleParameterFilter.setLayer*
> (StyleParameterFilter.java:197)
> at
> org.geoserver.gwc.layer.TileLayerInfoUtil.checkAutomaticStyles(TileLayerInfoUtil.java:162)
> at
> org.geoserver.gwc.layer.TileLayerInfoUtil.checkAutomaticStyles(TileLayerInfoUtil.java:140)
> at
> org.geoserver.gwc.layer.GeoServerTileLayer.lambda$getPublishedInfo$0(GeoServerTileLayer.java:401)
> ...
>
> Alternatively, Data > Layers > topp:states > Publishing - throws:
>
> org.apache.wicket.WicketRuntimeException: Error attaching this container
> for rendering: [Palette [Component id = extraStyles]]
> at
> org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1848)
> ...
> Caused by: java.lang.*NullPointerException*
> at org.geoserver.wms.web.publish.*StyleNameRenderer.getIdValue*
> (StyleNameRenderer.java:20)
> at
> org.apache.wicket.extensions.markup.html.form.palette.component.Recorder.initIds(Recorder.java:107)
> ...
> Priority: [image: Medium] Medium
> Reporter: Peter Smythe
> <https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=5b3b4ba74e83c12dd31159d6>
>
> This is due to a layer (in this case topp:states) pointing to a style
> (pophatch) that no longer exists when the configuration is read from
> disk/catalog.
>
> Unfortunately there are no logs that indicate which layer causes this
> problem and I had to view the Publishing page of each configured layer in
> order to determine which layer was at fault.
>
> Saving the layer (on any tab other than Publishing) fixes the problem on
> disk, so the next time GeoServer reloads the problem is fixed.
> [image: Add Comment]
> <https://osgeo-org.atlassian.net/browse/GEOS-9756#add-comment?atlOrigin=eyJpIjoiYjI1MWRjZDczNzdkNDcxNzlmOTg1ODBlYzQ3NjY4MGIiLCJwIjoiaiJ9>
>  Add
> Comment
> <https://osgeo-org.atlassian.net/browse/GEOS-9756#add-comment?atlOrigin=eyJpIjoiYjI1MWRjZDczNzdkNDcxNzlmOTg1ODBlYzQ3NjY4MGIiLCJwIjoiaiJ9>
>
> Get Jira notifications on your phone! Download the Jira Cloud app for
> Android
> <https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail>
> or iOS
> <https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8>
> ------------------------------
> This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100147-
> sha1:3ed3880)
> [image: Atlassian logo]
> _______________________________________________
> Geoserver-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to