Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-4898

Scheduler: misconfigured job should not disable all other jobs on activate()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Commons Scheduler 2.4.8
    • Fix Version/s: Commons Scheduler 2.4.10
    • Component/s: Commons
    • Labels:
      None

      Description

      Upon start of the scheduler bundle, if one Job is misconfigured and an exception is thrown like below, all other Jobs tracked by the ServiceTracker will be ignored since the exception bubbles up.

      I guess it should be isolated by catching any exception when calling register().

      21.07.2015 11:37:11.818 *ERROR* [FelixFrameworkWiring] org.apache.sling.commons.scheduler [org.apache.sling.commons.scheduler.impl.WhiteboardHandler(1950)] The activate method has thrown an exception (jav
      a.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long)
      java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long
              at org.apache.sling.commons.scheduler.impl.WhiteboardHandler.register(WhiteboardHandler.java:140)
              at org.apache.sling.commons.scheduler.impl.WhiteboardHandler.access$100(WhiteboardHandler.java:41)
              at org.apache.sling.commons.scheduler.impl.WhiteboardHandler$1.addingService(WhiteboardHandler.java:75)
              at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:932)
              at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:864)
              at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
              at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
              at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:317)
              at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
              at org.apache.sling.commons.scheduler.impl.WhiteboardHandler.activate(WhiteboardHandler.java:80)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
              at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
              at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
              at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
              at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
              at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
              at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
              at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:832)
              at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:799)
              at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:724)
              at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:399)
              at org.apache.felix.scr.impl.config.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:669)
              at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:184)
              at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:332)
              at org.apache.felix.scr.impl.Activator.access$000(Activator.java:49)
              at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:257)
              at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
              at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
              at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)
              at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415)
              at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
              at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
              at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:869)
              at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:790)
              at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:515)
              at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4409)
              at org.apache.felix.framework.Felix.startBundle(Felix.java:2098)
              at org.apache.felix.framework.Felix$RefreshHelper.restart(Felix.java:4861)
              at org.apache.felix.framework.Felix.refreshPackages(Felix.java:4128)
              at org.apache.felix.framework.FrameworkWiringImpl.run(FrameworkWiringImpl.java:178)
              at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Activity

            People

            • Assignee:
              cziegeler Carsten Ziegeler
              Reporter:
              alexander.klimetschek Alexander Klimetschek
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: