Uploaded image for project: 'GeoServer'
  1. GeoServer
  2. GEOS-7947

New created styles will not be published by JMS plugin

    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

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: