felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-4309) SCR leaves some components in DISABLED state
Date Tue, 12 Nov 2013 09:56:17 GMT

    [ https://issues.apache.org/jira/browse/FELIX-4309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13819970#comment-13819970
] 

Guillaume Nodet commented on FELIX-4309:
----------------------------------------

Testing the following patch:
{code}
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/Activator.java b/scr/src/main/java/org/apache/felix/scr/impl/Activator.java
index 24fdf65..552aa3e 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/Activator.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/Activator.java
@@ -28,6 +28,7 @@ import org.apache.felix.scr.impl.config.ScrConfiguration;
 import org.apache.felix.scr.impl.metadata.ComponentMetadata;
 import org.apache.felix.utils.extender.AbstractExtender;
 import org.apache.felix.utils.extender.Extension;
+import org.apache.felix.utils.extender.SimpleExtension;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
@@ -162,14 +163,14 @@ public class Activator extends AbstractExtender
     @Override
     protected Extension doCreateExtension(final Bundle bundle) throws Exception
     {
-        return new Extension()
+        return new SimpleExtension(bundle)
         {
-            public void start() throws Exception
+            public void doStart() throws Exception
             {
                 loadComponents( bundle );
             }
 
-            public void destroy() throws Exception
+            public void doDestroy() throws Exception
             {
                 disposeComponents( bundle );
             }
{code}

> SCR leaves some components in DISABLED state
> --------------------------------------------
>
>                 Key: FELIX-4309
>                 URL: https://issues.apache.org/jira/browse/FELIX-4309
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.8.0
>            Reporter: Guillaume Nodet
>
> When running some load testing (involving refresh and restarts) on bundles, I end up
with the following exceptions:
> {code}
> 2013-11-08 13:20:00,234 | ERROR | xFrameworkWiring | fabric-core                    
 | ?                                   ? | 61 - org.fusesource.fabric.fabric-core - 7.3.0.redhat-SNAPSHOT
| [org.fusesource.fabric.portservice.zookeeper] Cannot register Component
> java.lang.IllegalStateException: Invalid BundleContext.
> 	at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:514)[org.apache.felix.framework-4.0.3.redhat-610147.jar:]
> 	at org.apache.felix.framework.BundleContextImpl.getBundle(BundleContextImpl.java:112)[org.apache.felix.framework-4.0.3.redhat-610147.jar:]
> 	at org.apache.felix.scr.impl.ComponentRegistry.checkComponentName(ComponentRegistry.java:357)[74:org.apache.felix.scr:1.8.0.redhat-610147]
> 	at org.apache.felix.scr.impl.BundleComponentActivator.loadDescriptor(BundleComponentActivator.java:253)[74:org.apache.felix.scr:1.8.0.redhat-610147]
> 	at org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:153)[74:org.apache.felix.scr:1.8.0.redhat-610147]
> 	at org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:115)[74:org.apache.felix.scr:1.8.0.redhat-610147]
> 	at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:235)[74:org.apache.felix.scr:1.8.0.redhat-610147]
> 	at org.apache.felix.scr.impl.Activator.access$000(Activator.java:44)[74:org.apache.felix.scr:1.8.0.redhat-610147]
> 	at org.apache.felix.scr.impl.Activator$1.start(Activator.java:169)[74:org.apache.felix.scr:1.8.0.redhat-610147]
> 	at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:256)[74:org.apache.felix.scr:1.8.0.redhat-610147]
> 	at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:229)[74:org.apache.felix.scr:1.8.0.redhat-610147]
> 	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:479)[74:org.apache.felix.scr:1.8.0.redhat-610147]
> 	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:414)[74:org.apache.felix.scr:1.8.0.redhat-610147]
> 	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)[74:org.apache.felix.scr:1.8.0.redhat-610147]
> 	at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:443)[74:org.apache.felix.scr:1.8.0.redhat-610147]
> 	at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:870)[org.apache.felix.framework-4.0.3.redhat-610147.jar:]
> 	at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:791)[org.apache.felix.framework-4.0.3.redhat-610147.jar:]
> 	at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:515)[org.apache.felix.framework-4.0.3.redhat-610147.jar:]
> 	at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4580)[org.apache.felix.framework-4.0.3.redhat-610147.jar:]
> 	at org.apache.felix.framework.Felix$4.run(Felix.java:2115)[org.apache.felix.framework-4.0.3.redhat-610147.jar:]
> 	at org.apache.felix.framework.Felix.runInContext(Felix.java:2139)[org.apache.felix.framework-4.0.3.redhat-610147.jar:]
> 	at org.apache.felix.framework.Felix.startBundle(Felix.java:2113)[org.apache.felix.framework-4.0.3.redhat-610147.jar:]
> 	at org.apache.felix.framework.Felix$RefreshHelper.restart(Felix.java:5099)[org.apache.felix.framework-4.0.3.redhat-610147.jar:]
> 	at org.apache.felix.framework.Felix.refreshPackages(Felix.java:4303)[org.apache.felix.framework-4.0.3.redhat-610147.jar:]
> 	at org.apache.felix.framework.FrameworkWiringImpl.run(FrameworkWiringImpl.java:178)[org.apache.felix.framework-4.0.3.redhat-610147.jar:]
> 	at java.lang.Thread.run(Thread.java:722)[:1.7.0_12-ea]
> {code}
> The end result is that I end up with lots of components in DISABLED state while the bundles
are fully started
> {code}
> FuseFabric:karaf@root> scr:list
>    ID   State             Component Name
> [-1  ] [DISABLED        ] org.fusesource.fabric.placholder.resolver.port
> [-1  ] [DISABLED        ] org.fusesource.fabric.profile.urlhandler
> [-1  ] [DISABLED        ] org.fusesource.fabric.container.registration.karaf
> [-1  ] [DISABLED        ] org.fusesource.fabric.placholder.resolver.versionprop
> [-1  ] [DISABLED        ] org.fusesource.fabric.placholder.resolver.crypt
> [-1  ] [DISABLED        ] org.fusesource.fabric.portservice.zookeeper
> [-1  ] [DISABLED        ] org.fusesource.fabric.placholder.resolver.zookeeper
> [-1  ] [DISABLED        ] org.fusesource.fabric.placholder.resolver.env
> [-1  ] [DISABLED        ] org.fusesource.fabric.placholder.resolver.profileprop
> [-1  ] [DISABLED        ] org.fusesource.fabric.mbeanserver.listener
> [-1  ] [DISABLED        ] org.fusesource.fabric.service
> [46  ] [UNSATISFIED     ] org.fusesource.fabric.configadmin.bridge
> [93  ] [UNSATISFIED     ] org.fusesource.fabric.api.jmx.ClusterBootstrapManager
> [94  ] [UNSATISFIED     ] org.fusesource.fabric.api.jmx.ClusterServiceManager
> [95  ] [UNSATISFIED     ] org.fusesource.fabric.api.jmx.MQManager
> [96  ] [UNSATISFIED     ] org.fusesource.fabric.zookeeper.config.builder
> [97  ] [REGISTERED      ] org.fusesource.fabric.lock.service
> [98  ] [UNSATISFIED     ] org.fusesource.fabric.zookeeper.cluster.bootstrap
> [99  ] [UNSATISFIED     ] org.fusesource.fabric.zookeeper.cluster.service
> [100 ] [REGISTERED      ] org.fusesource.fabric.placholder.resolver.checksum
> [101 ] [UNSATISFIED     ] org.fusesource.fabric.container.provider.child
> [102 ] [UNSATISFIED     ] org.fusesource.fabric.placholder.resolver.container
> [103 ] [ACTIVE          ] org.fusesource.datastore.manager
> [164 ] [UNSATISFIED     ] org.fusesource.fabric.features
> [202 ] [ACTIVE          ] org.fusesource.fabric.extender.listener.blueprint
> [203 ] [ACTIVE          ] org.fusesource.fabric.extender.listener.spring
> [205 ] [ACTIVE          ] org.fusesource.fabric.jaas
> [206 ] [REGISTERED      ] org.fusesource.fabric.jaas.zookeeper.backingengine
> [207 ] [UNSATISFIED     ] org.fusesource.fabric.web
> [208 ] [ACTIVE          ] org.fusesource.fabric.zookeeper.acl
> [209 ] [ACTIVE          ] org.fusesource.fabric.zookeeper
> [210 ] [ACTIVE          ] org.fusesource.fabric.zookeeper.urlhandler
> [216 ] [ACTIVE          ] org.fusesource.fabric.maven
> [217 ] [UNSATISFIED     ] org.fusesource.fabric.git.hawtio
> [218 ] [UNSATISFIED     ] org.fusesource.fabric.datastore
> [219 ] [ACTIVE          ] org.fusesource.fabric.git.service
> [220 ] [UNSATISFIED     ] org.fusesource.fabric.git.master.listener
> [221 ] [UNSATISFIED     ] org.fusesource.fabric.git.server
> FuseFabric:karaf@root> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message