[ https://issues.apache.org/jira/browse/FELIX-3153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ioannis Canellos updated FELIX-3153: ------------------------------------ Affects Version/s: framework-3.2.2 I also managed to reproduce the same behavior using 3.2.2. An other interesting exception I get from time to time (using the same scenario) is the following: ERROR: Bundle org.apache.servicemix.jbi.deployer [171] EventDispatcher: Error during dispatch. (java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5) previously initiated loading for a different type with name "org/apache/servicemix/executors/Executor") java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5) previously initiated loading for a different type with name "org/apache/servicemix/executors/Executor" at org.apache.servicemix.wsn.component.WSNComponent$WSNEndpointManager.unregister(WSNComponent.java:291) at org.apache.servicemix.wsn.AbstractEndpoint.unregister(AbstractEndpoint.java:52) at org.apache.servicemix.wsn.AbstractPublisher.destroy(AbstractPublisher.java:81) at org.apache.servicemix.wsn.jms.JmsPublisher.destroy(JmsPublisher.java:149) at org.apache.servicemix.wsn.AbstractNotificationBroker.destroy(AbstractNotificationBroker.java:104) at org.apache.servicemix.wsn.jms.JmsNotificationBroker.destroy(JmsNotificationBroker.java:58) at org.apache.servicemix.wsn.component.WSNComponent.doShutDown(WSNComponent.java:191) at org.apache.servicemix.common.AsyncBaseLifeCycle.shutDown(AsyncBaseLifeCycle.java:259) at org.apache.servicemix.jbi.deployer.artifacts.ComponentImpl$ComponentWrapper.shutDown(ComponentImpl.java:277) at org.apache.servicemix.jbi.deployer.artifacts.ComponentImpl.shutDown(ComponentImpl.java:182) at org.apache.servicemix.jbi.deployer.impl.Deployer.unregisterComponent(Deployer.java:452) at org.apache.servicemix.jbi.deployer.impl.Deployer.unregisterDeployedComponent(Deployer.java:676) at org.apache.servicemix.jbi.deployer.impl.Deployer$1.removedService(Deployer.java:223) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:922) at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:351) at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:865) at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:871) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:733) at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662) at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3890) at org.apache.felix.framework.Felix.access$000(Felix.java:79) at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:728) at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:135) at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:129) at org.apache.aries.blueprint.container.ServiceRecipe.unregister(ServiceRecipe.java:201) at org.apache.aries.blueprint.container.BlueprintContainerImpl.notifySatisfaction(BlueprintContainerImpl.java:615) at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.setSatisfied(AbstractServiceReferenceRecipe.java:305) at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.serviceRemoved(AbstractServiceReferenceRecipe.java:281) at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.serviceChanged(AbstractServiceReferenceRecipe.java:251) at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:871) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:733) at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662) at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3890) at org.apache.felix.framework.Felix.access$000(Felix.java:79) at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:728) at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:135) at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:129) at org.apache.aries.blueprint.container.ServiceRecipe.unregister(ServiceRecipe.java:201) at org.apache.aries.blueprint.container.BlueprintContainerImpl.unregisterServices(BlueprintContainerImpl.java:673) at org.apache.aries.blueprint.container.BlueprintContainerImpl.namespaceHandlerUnregistered(BlueprintContainerImpl.java:866) at org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl$NamespaceHandlerSetImpl.unregisterHandler(NamespaceHandlerRegistryImpl.java:365) at org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl.unregisterHandler(NamespaceHandlerRegistryImpl.java:149) at org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl.removedService(NamespaceHandlerRegistryImpl.java:119) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:922) at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:351) at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:865) at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:871) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:733) at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:662) at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:3890) at org.apache.felix.framework.Felix.access$000(Felix.java:79) at org.apache.felix.framework.Felix$2.serviceChanged(Felix.java:728) at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:135) at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:129) at org.apache.aries.blueprint.container.ServiceRecipe.unregister(ServiceRecipe.java:201) at org.apache.aries.blueprint.container.BlueprintContainerImpl.unregisterServices(BlueprintContainerImpl.java:673) at org.apache.aries.blueprint.container.BlueprintContainerImpl.destroy(BlueprintContainerImpl.java:822) at org.apache.aries.blueprint.container.BlueprintExtender.destroyContext(BlueprintExtender.java:250) at org.apache.aries.blueprint.container.BlueprintExtender.bundleChanged(BlueprintExtender.java:242) at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintBundleTrackerCustomizer.modifiedBundle(BlueprintExtender.java:431) at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:453) at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:237) at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:413) at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729) at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610) at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3879) at org.apache.felix.framework.Felix.stopBundle(Felix.java:2268) at org.apache.felix.framework.Felix$RefreshHelper.stop(Felix.java:4668) at org.apache.felix.framework.Felix.refreshPackages(Felix.java:3699) at org.apache.felix.framework.PackageAdminImpl.run(PackageAdminImpl.java:365) at java.lang.Thread.run(Thread.java:680) > refreshPackages on certain bundles can create a mess > ---------------------------------------------------- > > Key: FELIX-3153 > URL: https://issues.apache.org/jira/browse/FELIX-3153 > Project: Felix > Issue Type: Bug > Affects Versions: framework-3.0.9, framework-3.2.2 > Reporter: Ioannis Canellos > > When using refreshPackages on a bundle that is used by a lot of other > bundles, it results in error. > There is no deterministic behavior and the error is not always the same, even > if I repeat the exact same test twice. > A typical example on how I reproduce it is to refresh the spring-context > bundle inside servicemix 4.4 (running on felix). > If I switch to equinox I don't have that issue. That doesn't say much, but I > mention it to exclude other possibilities. > From my logs I see that Felix tries to refresh the bundles in the populated > graph with a different order each time (I don't know if this helps > identifying the issue). > Usually, the error looks like this: > ERROR: Bundle org.springframework.osgi.extender [83] Error stopping bundle. > (java.lang.NoClassDefFoundError: org/osgi/framework/ServiceRegistration) > java.lang.NoClassDefFoundError: org/osgi/framework/ServiceRegistration > at > org.springframework.osgi.util.OsgiServiceUtils.unregisterService(OsgiServiceUtils.java:41) > at > org.springframework.osgi.extender.internal.support.NamespaceManager.unregisterResolverService(NamespaceManager.java:195) > at > org.springframework.osgi.extender.internal.support.NamespaceManager.destroy(NamespaceManager.java:223) > at > org.springframework.osgi.extender.internal.activator.ContextLoaderListener.shutdown(ContextLoaderListener.java:547) > at > org.springframework.osgi.extender.internal.activator.ContextLoaderListener.stop(ContextLoaderListener.java:431) > at > org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:651) > at org.apache.felix.framework.Felix.stopBundle(Felix.java:2216) > at org.apache.felix.framework.Felix$RefreshHelper.stop(Felix.java:4489) > at org.apache.felix.framework.Felix.refreshPackages(Felix.java:3581) > at > org.apache.felix.framework.PackageAdminImpl.run(PackageAdminImpl.java:363) > at java.lang.Thread.run(Thread.java:680) > Caused by: java.lang.ClassNotFoundException: > org.osgi.framework.ServiceRegistration not found by > org.springframework.osgi.core [80] > at > org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787) > at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71) > at > org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768) > at java.lang.ClassLoader.loadClass(ClassLoader.java:247) > ... 11 more -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira