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

JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • JCR Resource 2.5.6
    • JCR Resource 2.7.0
    • JCR
    • None

    Description

      With OAK-3842 a fair number of oak packages have gotten their export version reset to 0.0.0 instead of exporting a particular version (as that package is not meant to be a stable API just yet).

      One consequence of this change is that JcrResourceProviderFactory now fails with a NoClassDefFoundError as it has as import dependency org.apache.jackrabbit.oak.plugins.observation; resolution:=optional; version="[2.0, 3)" while that is now exported as 0.0.0.

      Not sure if we have to do much or of this gets fixed automagically when we're releasing a new jcr.resource bundle (cziegeler, wdyt?).

      Here's the details of the exception:

      02.02.2016 11:02:55.098 *ERROR* [FelixStartLevel] org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory Unable to instantiate improved JCR Resource listener for Oak. Using fallback.
      java.lang.NoClassDefFoundError: org/apache/jackrabbit/oak/plugins/observation/NodeObserver
              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
              at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2370)
              at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2154)
              at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1542)
              at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
              at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
              at org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory.activate(JcrResourceProviderFactory.java:159)
              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:866)
              at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:833)
              at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:774)
              at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:347)
              at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247)
              at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:344)
              at org.apache.felix.framework.Felix.getService(Felix.java:3699)
              at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)
              at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:72)
              at org.apache.felix.scr.impl.helper.BindMethod.getServiceObject(BindMethod.java:646)
              at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2137)
              at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.prebind(DependencyManager.java:389)
              at org.apache.felix.scr.impl.manager.DependencyManager.prebind(DependencyManager.java:1457)
              at org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(AbstractComponentManager.java:983)
              at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:812)
              at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:724)
              at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:954)
              at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:915)
              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1215)
              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1136)
              at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:945)
              at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:881)
              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)
              at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:120)
              at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:991)
              at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:839)
              at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:546)
              at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4557)
              at org.apache.felix.framework.Felix.registerService(Felix.java:3549)
              at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)
              at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:869)
              at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:857)
              at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:133)
              at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:915)
              at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:715)
              at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:399)
              at org.apache.felix.scr.impl.config.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:676)
              at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:339)
              at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:360)
              at org.apache.felix.scr.impl.Activator.access$000(Activator.java:53)
              at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:260)
              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:916)
              at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:835)
              at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:517)
              at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4541)
              at org.apache.felix.framework.Felix.startBundle(Felix.java:2172)
              at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
              at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.ClassNotFoundException: org.apache.jackrabbit.oak.plugins.observation.NodeObserver not found by org.apache.sling.jcr.resource [121]
              at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)
              at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
              at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
              ... 75 common frames omitted
      

      Attachments

        Issue Links

          Activity

            People

              rombert Robert Munteanu
              stefanegli Stefan Egli
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: