Uploaded image for project: 'GeoServer'
  1. GEOS-7948

JMS plugin handlers don't initiate transient fields of layer groups associated data stores

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.9.3, 2.10.1, 2.11-beta
    • Fix Version/s: 2.9.4, 2.10.2, 2.11-beta
    • Component/s: Community modules
    • Labels:
      None

      Description

      When a new layer group is created on a master node, the layer group definition is serialized and published to the slave nodes.

      Performing a get map operation using the created layer group on a slave node will provoke a NULL pointer exception:

      java.lang.NullPointerException at org.geoserver.catalog.impl.DataStoreInfoImpl.getDataStore(DataStoreInfoImpl.java:38)
      

      Reloading the GeoServer slave instance fixes the problem.

      This issue happens because the catalog field of StoreInfo default implementation is transient, hence is not serialized when the layer group is published by the master node:
      https://github.com/geoserver/geoserver/blob/master/src/main/src/main/java/org/geoserver/catalog/impl/StoreInfoImpl.java#L39

      When adding the new layer group to the catalog of the slave instance the layer group associated stores are not initialized:
      https://github.com/geoserver/geoserver/blob/master/src/main/src/main/java/org/geoserver/catalog/impl/DefaultCatalogFacade.java#L493-L495

      This also why, when the GeoServer instance is reloaded the issue is gone.

      To reproduce this issue just created a layer group with the JMS plugin installed and try to do a layer preview on a slave node.

        Attachments

          Activity

            People

            • Assignee:
              nmco Nuno Oliveira
              Reporter:
              nmco Nuno Oliveira
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: