Hi Miroslav, On Mon, 2019-09-30 at 22:09 +0200, Miroslav Beranič wrote: > Hi all, > > I've installed bundle "org.apache.sling.commons.scheduler:2.7.4" on > Karaf > 4.3.0, and I get exception from activation: > - The activate method has thrown an exception > - IllegalArgumentException: A metric named > commons.scheduler.oldest.running.job.millis already exists > > The class in case is > org.apache.sling.commons.scheduler.impl.GaugesSupport. > > It seems like gauges registered/created at the: > @Activate > protected void activate(final BundleContext ctx) > > are not removed at the deactivate method: > @Deactivate > void deactivate()
Looks like a bug to me, thanks for reporting this. Could you file a Jira issue at https://issues.apache.org/jira/browse/SLING and maybe a PR with your proposed changes at https://github.com/apache/sling-org-apache-sling-commons-scheduler ? This makes it easier to discuss non-trivial changes. Thanks! Robert
