[Geoserver-devel] [JIRA] (GEOS-7947) New created styles will not be published by JMS plugin

Nuno Oliveira created an issue

GeoServer / BugGEOS-7947

New created styles will not be published by JMS plugin

Issue Type:

BugBug

Affects Versions:

2.9.3, 2.11-beta, 2.10.1

Assignee:

Unassigned

Components:

Community modules

Created:

24/Jan/17 4:31 PM

Priority:

MediumMedium

Reporter:

Nuno Oliveira

Any style addition will provoke this exception in JMS publisher:

org.geoserver.catalog.CatalogException: java.lang.IllegalStateException:
Unable to find style for event: StyleInfoImpl[test_style] at
org.geoserver.cluster.server.JMSCatalogListener.handleAddEvent(JMSCatalogListener.java:118)

This issue is provoked by this check:
https://github.com/geoserver/geoserver/blob/master/src/community/jms-cluster/jms-geoserver/src/main/java/org/geoserver/cluster/server/JMSCatalogListener.java#L103-L105

We actually want to make sure that the style resource is of type RESOURCE, so the check should be like this:

if(!Resources.exists(styleFile)
   || !Resources.canRead(styleFile)
   || !(styleFile.getType() == Type.RESOURCE)){
      throw new IllegalStateException("Unable to find style for event: "+sInfo.toString());
}

To reproduce this issue just create a style with the JMS plugin installed.

Add Comment

Add Comment

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

Atlassian logo