Assigning style within read-protected workspace using JMS clustering causes ServiceException java.lang.NullPointerException
Description
Environment
Platform:
Tomcat 6 (under JBoss 5.2), OpenJDK java version 1.7.0_95, rhel-2.6.4.0.el6_7-x86_64
Setup:
jms-cluster-plugin added to default GeoServer war
2 nodes, each their own GEOSERVER_DATA_DIR pointing to a copy of the default datadir
Activemq default setup with 1 broker per node, discovery through multicast:
-Dactivemq.transportConnectors.server.uri=tcp://0.0.0.0:62626?maximumConnections=1000&wireFormat.maxFrameSize=104857600&jms.useAsyncSend=true&transport.daemon=true&trace=true
-Dactivemq.transportConnectors.server.discoveryURI=multicast://default?group=GeoServer-T
cluster.properties:
#
#Wed Mar 30 09:53:18 CEST 2016
toggleSlave=true
topicName=VirtualTopic.>
connection=enabled
brokerURL=
durable=false
xbeanURL=./broker.xml
toggleMaster=true
embeddedBroker=enabled
CLUSTER_CONFIG_DIR=/data/geoserver/data-cluster/node0X
embeddedBrokerProperties=embedded-broker.properties
connection.retry=3
instanceName=aca001ec-61ae-473f-aab5-295010e29d1a
readOnly=disabled
group=geoserver-cluster-T
connection.maxwait=10000
Activity

Luiz Caires July 10, 2017 at 1:15 PM
Verified that the same issue still present in Geoserver 2.11.1 with JMS plugin

Dion Wooning March 30, 2016 at 2:46 PM
Just verified that the issue is still present in 2.8.3, probably affects 2.8 in general.
Details
Details
Assignee
Reporter

Assigning a style from a read-protected workspace using JMS clustering causes ServiceException java.lang.NullPointerException, either using Admin UI or REST interface. This report will show how to reproduce using the Admin UI:
Verify clustering is working properly:
use the Admin UI on node 1 to generate a new style e.g. 'orange' under workspace 'topp' for type 'polygon'
verify style is present on node 2
on node 1, under tab Publishing modify default style of 'topp:tasmania_state_boundaries' to 'topp:orange'
on node 1, verify 'tasmania_state_boundaries' uses the new style using the layer preview (mind image caching, drag or zoom a bit)
on node 2, verify 'tasmania_state_boundaries' uses the new style using the layer preview (mind image caching, drag or zoom a bit)
Reproduce the issue:
node 1 and 2: under security->data, add new rule
workspace: 'topp', layer: '*', access mode: 'read', selected role: 'GROUP_ADMIN'
repeat 1-5 above with a new style e.g. 'yellow' within workspace 'topp'.
RESULT: The new style is active in layer preview on node 1, node 2 FAILs to draw images, in cases causes GetCapabilities to issue an NPE as well.
Interestingly, the 'yellow' style IS present on node 2, and when viewing the Publishing tab of the offending layer on node 2, it does show the 'topp:yellow' style.
Log on node 2