Stefan Egli created SLING-10204:
-----------------------------------
Summary: Make OakDiscoveryService.updatedPropertyProvider tolerate
deactivated repository
Key: SLING-10204
URL: https://issues.apache.org/jira/browse/SLING-10204
Project: Sling
Issue Type: Task
Components: Discovery
Reporter: Stefan Egli
Assignee: Stefan Egli
The following exception has been witnessed during resource resolver factory
unregistration:
{noformat}
java.lang.IllegalArgumentException: Can't create child on a synthetic root
at
org.apache.sling.resourceresolver.impl.ResourceResolverImpl.create(ResourceResolverImpl.java:979)
[org.apache.sling.resourceresolver:1.7.2]
...
at
org.apache.sling.api.resource.ResourceUtil.getOrCreateResource(ResourceUtil.java:571)
[org.apache.sling.api:2.22.0]
at
org.apache.sling.discovery.commons.providers.util.ResourceHelper.getOrCreateResource(ResourceHelper.java:45)
[org.apache.sling.discovery.commons:1.0.20]
at
org.apache.sling.discovery.oak.OakDiscoveryService.doUpdateProperties(OakDiscoveryService.java:492)
[org.apache.sling.discovery.oak:1.2.30]
at
org.apache.sling.discovery.oak.OakDiscoveryService.bindPropertyProviderInteral(OakDiscoveryService.java:406)
[org.apache.sling.discovery.oak:1.2.30]
at
org.apache.sling.discovery.oak.OakDiscoveryService.updatedPropertyProvider(OakDiscoveryService.java:421)
[org.apache.sling.discovery.oak:1.2.30]
at jdk.internal.reflect.GeneratedMethodAccessor65.invoke(Unknown
Source){noformat}
Under normal circumstances osgi should not invoke any of the
updatedPropertyProvider/unbindPropertyProvider methods after the
resourceResolverFactory is deactivated - but it has been seen nevertheless.
What can be done in OakDiscoveryService is to tolerate this and not issue a
log.warn instead of throwing an uncaught IllegalArgumentException.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)