[Geoserver-devel] [JIRA] (GEOS-7948) JMS plugin handlers don't initiate transient fields of layer groups associated data stores

Nuno Oliveira created an issue

GeoServer / BugGEOS-7948

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

Issue Type:

BugBug

Affects Versions:

2.9.3, 2.11-beta, 2.10.1

Assignee:

Unassigned

Components:

Community modules

Created:

24/Jan/17 4:53 PM

Priority:

MediumMedium

Reporter:

Nuno Oliveira

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.

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.695.3#100025-sha1:c635a15)

Atlassian logo