[
https://issues.apache.org/jira/browse/SLING-9588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17157508#comment-17157508
]
Karl Pauls commented on SLING-9588:
-----------------------------------
Looks like this:
{code:java}
14.07.2020 13:41:15.831 *ERROR* [FelixLogListener]
org.apache.sling.commons.fsclassloader.impl.FSClassLoaderProvider bundle
org.apache.sling.commons.fsclassloader:1.0.12
(282)[org.apache.sling.commons.fsclassloader.impl.FSClassLoaderProvider(765)] :
The activate method has thrown an exception (java.lang.IllegalStateException:
Service already unregistered.)
java.lang.IllegalStateException: Service already unregistered.
at
org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:141)
at
org.apache.sling.commons.fsclassloader.impl.FSClassLoaderProvider.activate(FSClassLoaderProvider.java:143)
[org.apache.sling.commons.fsclassloader:1.0.12]
{code}
> The FSClassLoaderProvider activate/deactivate is racing to unregister the
> MBean
> -------------------------------------------------------------------------------
>
> Key: SLING-9588
> URL: https://issues.apache.org/jira/browse/SLING-9588
> Project: Sling
> Issue Type: Bug
> Components: Commons
> Affects Versions: File System ClassLoader 1.0.12
> Reporter: Karl Pauls
> Priority: Major
> Fix For: File System ClassLoader 1.0.14
>
>
> It looks like the activate/deactivate method of the FSClassLoaderProvider is
> racing to unregister the mbean service reference. That is problematic as if
> it is unregistered twice, it will throw an exception - potentially killing
> the activate.
> Not sure what the right thing todo is here - but it seems very strange that
> the service ref would be static and clearly, there is a check-then-act cases
> in the below:
> https://github.com/apache/sling-org-apache-sling-commons-fsclassloader/blob/97d73c116d296b290e4484ca842bbbf185a8d36e/src/main/java/org/apache/sling/commons/fsclassloader/impl/FSClassLoaderProvider.java#L142
> https://github.com/apache/sling-org-apache-sling-commons-fsclassloader/blob/97d73c116d296b290e4484ca842bbbf185a8d36e/src/main/java/org/apache/sling/commons/fsclassloader/impl/FSClassLoaderProvider.java#L169
> [~cziegeler], any ideas why the code would be like it is right now?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)