Aries
  1. Aries
  2. ARIES-961

org.osgi.service.blueprint.container.NoSuchComponentException: No component with id '...' could be found + java.lang.NullPointerException at org.apache.aries.blueprint.container.BlueprintContainerImpl.getSatisfiableDependenciesMap

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: blueprint-core-1.0.1
    • Fix Version/s: None
    • Component/s: Blueprint
    • Labels:
      None
    • Environment:

      Description

      This is the strangest error:

      2012-11-07 19:41:52,295 | ERROR | rint Extender: 2 | ServiceRecipe                    | lueprint.container.ServiceRecipe  294 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Error retrieving service from ServiceRecipe[name='.component-2']
      org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapPool' could be found
              at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:55)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:280)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:247)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:234)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.ServiceRecipe.getClasses(ServiceRecipe.java:367)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:185)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:668)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:352)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
              at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
              at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
      2012-11-07 19:41:52,296 | ERROR | rint Extender: 2 | ServiceRecipe                    | lueprint.container.ServiceRecipe  323 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Error retrieving service from ServiceRecipe[name='.component-2']
      org.osgi.service.blueprint.container.ComponentDefinitionException: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapPool' could be found
              at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:295)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:247)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:234)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.ServiceRecipe.getClasses(ServiceRecipe.java:367)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:185)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:668)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:352)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
              at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
              at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
      Caused by: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapPool' could be found
              at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:55)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:280)[7:org.apache.aries.blueprint.core:1.0.1]
              ... 16 more
      2012-11-07 19:41:52,297 | ERROR | rint Extender: 2 | BlueprintContainerImpl           | container.BlueprintContainerImpl  375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_ldap.xml
      org.osgi.service.blueprint.container.ComponentDefinitionException: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapPool' could be found
              at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:295)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:247)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:234)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.ServiceRecipe.getClasses(ServiceRecipe.java:367)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:185)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:668)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:352)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
              at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
              at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
      Caused by: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapPool' could be found
              at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:55)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:280)[7:org.apache.aries.blueprint.core:1.0.1]
              ... 16 more
      

      During repeated refresh, the above error occur about 40% of the time, while the NPE below occur about 60% :

      2012-11-07 20:10:21,697 | ERROR | rint Extender: 1 | BlueprintContainerImpl           | container.BlueprintContainerImpl  375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_ldap.xml
      java.lang.NullPointerException
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.getSatisfiableDependenciesMap(BlueprintContainerImpl.java:545)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.getSatisfiableDependenciesMap(BlueprintContainerImpl.java:537)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:657)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:352)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
              at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
              at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
              at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
      

      The Blueprint (berbatik_ldap.xml, deployed as symlink to karaf/deploy folder):

      <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
          xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0"
          xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
          	http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
          	http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0 http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0">
          
      	<cm:property-placeholder persistent-id="berbatik" update-strategy="reload">
      		<cm:default-properties>
      			<!-- Auth -->
      			<cm:property name="authLdapUri"				value="ldap://localhost:10389" />
      			<cm:property name="authLdapBindDn"			value="uid=admin,ou=system" />
      			<cm:property name="authLdapBindPassword"	value="secret" />
      		</cm:default-properties>
      	</cm:property-placeholder>
          
      	<bean id="ldapConfig" class="org.soluvas.ldap.LdapUtils" factory-method="createTrustingConfig">
      		<argument value="${authLdapUri}"/>
      		<argument value="${authLdapBindDn}"/>
      		<argument value="${authLdapBindPassword}"/>
      	</bean>
      	<service auto-export="interfaces">
      		<service-properties>
      			<entry key="clientId" value="${clientId}"/>
      			<entry key="tenantEnv" value="${tenantEnv}"/>
      			<entry key="tenantId" value="${tenantId}"/>
      			<entry key="suppliedClass" value="org.apache.directory.ldap.client.api.LdapConnectionConfig" />
      		</service-properties>
      		<bean class="com.google.common.base.Suppliers" factory-method="ofInstance">
      			<argument ref="ldapConfig" />
      		</bean>
      	</service>
      	<bean id="ldapConnFactory" class="org.apache.directory.ldap.client.api.PoolableLdapConnectionFactory"
      		depends-on="ldapConfig">
      		<argument ref="ldapConfig"/>
      	</bean>
      	<bean id="ldapPool" class="org.apache.directory.ldap.client.api.LdapConnectionPool"
      		depends-on="ldapConnFactory" destroy-method="close">
      		<argument ref="ldapConnFactory"/>
      	</bean>
      	<service ref="ldapPool" auto-export="interfaces">
      		<service-properties>
      			<entry key="clientId" value="${clientId}"/>
      			<entry key="tenantEnv" value="${tenantEnv}"/>
      			<entry key="tenantId" value="${tenantId}"/>
      			<entry key="namespace" value="ldap"/>
      		</service-properties>
      	</service>
      
      </blueprint>
      

      Maybe something is wrong with my setup, but the I suspect the error message is misleading, as I can verify bean "ldapPool" is indeed there in the XML.

      Bundles:

      karaf@root> list -s -t 0
      START LEVEL 100 , List Threshold: 0
         ID   State         Blueprint      Spring    Level  Symbolic name
      [   0] [Active     ] [            ] [       ] [    0] org.apache.felix.framework (4.0.3)
      [   1] [Active     ] [            ] [       ] [    5] org.ops4j.pax.url.mvn (1.3.5)
      [   2] [Active     ] [            ] [       ] [    5] org.ops4j.pax.url.wrap (1.3.5)
      [   3] [Active     ] [            ] [       ] [    8] org.ops4j.pax.logging.pax-logging-service (1.7.0)
      [   4] [Active     ] [            ] [       ] [    8] org.ops4j.pax.logging.pax-logging-api (1.7.0)
      [   5] [Active     ] [            ] [       ] [   10] org.apache.felix.configadmin (1.4.0)
      [   6] [Active     ] [            ] [       ] [   11] org.apache.felix.fileinstall (3.2.6)
      [   7] [Active     ] [Created     ] [       ] [   20] org.apache.aries.blueprint.core (1.0.1)
      [   8] [Active     ] [            ] [       ] [   20] org.apache.aries.util (1.0.0)
      [   9] [Active     ] [            ] [       ] [   20] org.apache.aries.proxy.api (1.0.0)
      [  10] [Active     ] [            ] [       ] [   20] org.objectweb.asm.all (4.0)
      [  11] [Active     ] [            ] [       ] [   20] org.apache.aries.blueprint.api (1.0.0)
      [  12] [Active     ] [            ] [       ] [   20] org.apache.aries.proxy.impl (1.0.0)
      [  13] [Active     ] [Created     ] [       ] [   20] org.apache.aries.blueprint.cm (1.0.0)
      [  14] [Active     ] [Created     ] [       ] [   25] org.apache.karaf.shell.console (2.3.0)
      [  15] [Active     ] [Created     ] [       ] [   28] org.apache.karaf.deployer.blueprint (2.3.0)
      [  16] [Active     ] [Created     ] [       ] [   28] org.apache.karaf.deployer.spring (2.3.0)
      [  17] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.shell.ssh (2.3.0)
      [  18] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.management.server (2.3.0)
      [  19] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.shell.commands (2.3.0)
      [  20] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.features.core (2.3.0)
      [  21] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.shell.log (2.3.0)
      [  22] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.features.command (2.3.0)
      [  23] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.diagnostic.management (2.3.0)
      [  24] [Active     ] [            ] [       ] [   30] org.apache.sshd.core (0.8.0)
      [  25] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.deployer.wrap (2.3.0)
      [  26] [Active     ] [            ] [       ] [   30] org.apache.mina.core (2.0.7)
      [  27] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.admin.command (2.3.0)
      [  28] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.diagnostic.command (2.3.0)
      [  29] [Active     ] [            ] [       ] [   30] org.apache.aries.jmx.core (1.0.1)
      [  30] [Active     ] [            ] [       ] [   30] org.apache.karaf.diagnostic.core (2.3.0)
      [  31] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.admin.management (2.3.0)
      [  32] [Active     ] [            ] [       ] [   30] org.apache.aries.jmx.api (1.0.0)
      [  33] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.diagnostic.common (2.3.0)
      [  34] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.shell.dev (2.3.0)
      [  35] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.deployer.features (2.3.0)
      [  36] [Active     ] [            ] [       ] [   30] org.apache.aries.jmx.blueprint.api (1.0.0)
      [  37] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.jaas.command (2.3.0)
      [  38] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.jaas.modules (2.3.0)
      [  39] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.shell.osgi (2.3.0)
      [  40] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.features.management (2.3.0)
      [  41] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.shell.packages (2.3.0)
      [  42] [Active     ] [            ] [       ] [   30] org.apache.aries.jmx.blueprint.core (1.0.1)
      [  43] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.admin.core (2.3.0)
      [  44] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.deployer.kar (2.3.0)
      [  45] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.jaas.config (2.3.0)
      [  46] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.shell.config (2.3.0)
      [  47] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.management.mbeans.system (2.3.0)
      [  48] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.management.mbeans.bundles (2.3.0)
      [  49] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.management.mbeans.services (2.3.0)
      [  50] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.management.mbeans.config (2.3.0)
      [  51] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.management.mbeans.log (2.3.0)
      [  52] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.management.mbeans.packages (2.3.0)
      [  53] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.management.mbeans.dev (2.3.0)
      [  57] [Active     ] [            ] [       ] [   30] org.apache.servicemix.specs.activation-api-1.1 (2.1.0)
      [  58] [Active     ] [            ] [       ] [   30] org.apache.geronimo.specs.geronimo-servlet_2.5_spec (1.1.2)
      [  59] [Active     ] [            ] [       ] [   30] javax.mail (1.4.5)
      [  60] [Active     ] [            ] [       ] [   30] org.apache.geronimo.specs.geronimo-jta_1.1_spec (1.1.1)
      [  61] [Active     ] [            ] [       ] [   30] org.eclipse.jetty.util (7.6.7.v20120910)
      [  62] [Active     ] [            ] [       ] [   30] org.eclipse.jetty.io (7.6.7.v20120910)
      [  63] [Active     ] [            ] [       ] [   30] org.eclipse.jetty.http (7.6.7.v20120910)
      [  64] [Active     ] [            ] [       ] [   30] org.eclipse.jetty.client (7.6.7.v20120910)
      [  65] [Active     ] [            ] [       ] [   30] org.eclipse.jetty.continuation (7.6.7.v20120910)
      [  66] [Active     ] [            ] [       ] [   30] org.eclipse.jetty.jmx (7.6.7.v20120910)
      [  67] [Active     ] [            ] [       ] [   30] org.eclipse.jetty.server (7.6.7.v20120910)
      [  68] [Active     ] [            ] [       ] [   30] org.eclipse.jetty.security (7.6.7.v20120910)
      [  69] [Active     ] [            ] [       ] [   30] org.eclipse.jetty.servlet (7.6.7.v20120910)
      [  70] [Active     ] [            ] [       ] [   30] org.eclipse.jetty.servlets (7.6.7.v20120910)
      [  71] [Active     ] [            ] [       ] [   30] org.eclipse.jetty.xml (7.6.7.v20120910)
      [  72] [Active     ] [            ] [       ] [   30] org.eclipse.jetty.webapp (7.6.7.v20120910)
      [  73] [Active     ] [            ] [       ] [   30] org.eclipse.jetty.jndi (7.6.7.v20120910)
      [  74] [Active     ] [            ] [       ] [   30] org.eclipse.jetty.plus (7.6.7.v20120910)
      [  75] [Active     ] [            ] [       ] [   30] org.eclipse.jetty.websocket (7.6.7.v20120910)
      [  76] [Active     ] [            ] [       ] [   30] org.ops4j.pax.web.pax-web-api (1.1.3)
      [  77] [Active     ] [            ] [       ] [   30] org.ops4j.pax.web.pax-web-spi (1.1.3)
      [  78] [Active     ] [            ] [       ] [   30] org.ops4j.pax.web.pax-web-runtime (1.1.3)
      [  79] [Active     ] [            ] [       ] [   30] org.ops4j.pax.web.pax-web-jetty (1.1.3)
      [  80] [Active     ] [            ] [       ] [   30] org.apache.felix.metatype (1.0.4)
      [  81] [Resolved   ] [            ] [       ] [   30] org.apache.karaf.webconsole.branding (2.3.0)
                                             Hosts: 82
      [  82] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.webconsole.console (2.3.0)
                                             Fragments: 81
      [  83] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.webconsole.admin (2.3.0)
      [  84] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.webconsole.features (2.3.0)
      [  85] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.webconsole.gogo (2.3.0)
      [  86] [Active     ] [            ] [       ] [   30] org.apache.felix.webconsole.plugins.event (1.0.2)
      [  87] [Active     ] [            ] [       ] [   30] org.ops4j.pax.web.pax-web-extender-whiteboard (1.1.3)
      [  88] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.shell.web (2.3.0)
      [  89] [Active     ] [Created     ] [       ] [   30] org.apache.karaf.management.mbeans.web (2.3.0)
      [  90] [Active     ] [            ] [       ] [   30] org.ops4j.pax.web.pax-web-jsp (1.1.3)
      [  91] [Active     ] [            ] [       ] [   30] org.ops4j.pax.web.pax-web-extender-war (1.1.3)
      [  92] [Active     ] [            ] [       ] [   30] org.ops4j.pax.web.pax-web-deployer (1.1.3)
      [  93] [Active     ] [            ] [       ] [   30] org.ops4j.pax.url.war (1.3.5)
      [1767] [Active     ] [            ] [       ] [   50] org.apache.geronimo.specs.geronimo-atinject_1.0_spec (1.0)
      [1768] [Active     ] [            ] [       ] [   50] org.apache.geronimo.specs.geronimo-el_2.2_spec (1.0.3)
      [1770] [Active     ] [            ] [       ] [   50] org.apache.geronimo.specs.geronimo-interceptor_3.0_spec (1.0.1)
      [1771] [Active     ] [            ] [       ] [   50] org.apache.geronimo.specs.geronimo-jcdi_1.0_spec (1.0)
      [1780] [Active     ] [            ] [       ] [   50] com.rabbitmq.client (2.8.5)
      [1831] [Active     ] [            ] [       ] [   50] org.apache.httpcomponents.httpcore (4.2.1)
      [1832] [Active     ] [            ] [       ] [   50] org.apache.httpcomponents.httpclient (4.2.1)
      [1836] [Active     ] [            ] [       ] [   30] org.apache.geronimo.specs.geronimo-jpa_2.0_spec (1.1)
      [1837] [Active     ] [            ] [       ] [   30] org.apache.aries.jpa.api (1.0.0)
      [1838] [Active     ] [Created     ] [       ] [   30] org.apache.aries.jpa.blueprint.aries (1.0.0)
      [1839] [Active     ] [            ] [       ] [   30] org.apache.aries.jpa.container (1.0.0)
      [1840] [Active     ] [            ] [       ] [   30] org.apache.aries.jpa.container.context (1.0.1)
      [1847] [Active     ] [            ] [       ] [   40] org.apache.servicemix.bundles.antlr-runtime (3.4.0.2)
      [1848] [Active     ] [            ] [       ] [   40] org.apache.servicemix.bundles.stringtemplate (4.0.2.1)
      [1849] [Active     ] [            ] [       ] [   50] org.apache.commons.pool (1.6.0)
      [1850] [Active     ] [            ] [       ] [   50] org.apache.servicemix.bundles.antlr (2.7.7.5)
      [1851] [Active     ] [            ] [       ] [   50] org.apache.commons.collections (3.2.1)
      [1852] [Active     ] [            ] [       ] [   50] org.apache.commons.lang (2.6)
      [1853] [Active     ] [            ] [       ] [   50] org.apache.directory.shared.ldap.client.api (1.0.0.M13)
      [1854] [Active     ] [            ] [       ] [   50] org.apache.directory.shared.asn1.api (1.0.0.M13)
      [1855] [Active     ] [            ] [       ] [   50] org.apache.directory.shared.asn1.ber (1.0.0.M13)
      [1856] [Active     ] [            ] [       ] [   50] org.apache.directory.shared.i18n (1.0.0.M13)
      [1857] [Active     ] [            ] [       ] [   50] org.apache.directory.shared.util (1.0.0.M13)
      [1858] [Active     ] [            ] [       ] [   50] org.apache.directory.shared.ldap.codec.core (1.0.0.M13)
      [1859] [Active     ] [            ] [       ] [   50] org.apache.directory.shared.ldap.net.mina (1.0.0.M13)
      [1860] [Active     ] [            ] [       ] [   50] org.apache.directory.shared.ldap.model (1.0.0.M13)
      [1861] [Active     ] [            ] [       ] [   50] org.apache.directory.shared.ldap.schema (1.0.0.M13)
      [1862] [Active     ] [            ] [       ] [   50] org.apache.directory.shared.ldap.extras.aci (1.0.0.M13)
      [1864] [Active     ] [            ] [       ] [   50] wrap_mvn_com.google.protobuf_protobuf-java_2.4.1_Export-Package___version_2.4.1 (0)
      [1865] [Active     ] [            ] [       ] [   50] org.mvel2 (2.1.0.drools16)
      [1866] [Active     ] [            ] [       ] [   50] wrap_mvn_com.sun.istack_istack-commons-runtime_2.12_Export-Package___version_2.12.0 (0)
      [1867] [Active     ] [            ] [       ] [   50] org.drools.api (5.4.0.Final)
      [1868] [Active     ] [            ] [       ] [   50] org.drools.internalapi (5.4.0.Final)
      [1869] [Active     ] [            ] [       ] [   50] org.drools.core (5.4.0.Final)
      [1870] [Active     ] [            ] [       ] [   50] org.drools.compiler (5.4.0.Final)
      [1871] [Active     ] [            ] [       ] [   50] org.drools.templates (5.4.0.Final)
      [1872] [Active     ] [            ] [       ] [   50] com.sun.jersey.core (1.14.0)
      [1873] [Active     ] [            ] [       ] [   50] com.sun.jersey.client (1.14.0)
      [1874] [Active     ] [            ] [       ] [   50] wrap_mvn_org.scala-lang_scala-library_2.9.2 (0)
      [1875] [Resolved   ] [            ] [       ] [   50] wrap_mvn_org.neo4j_neo4j-kernel_1.7.2_Export-Package_org.neo4j.unsafe.batchinsert_neo4j-kernel__split__ (0)
      [1876] [Resolved   ] [            ] [       ] [   50] wrap_mvn_org.neo4j_neo4j-lucene-index_1.7.2_Export-Package_org.neo4j.unsafe.batchinsert_neo4j-lucene-index__split__ (0)
      [1877] [Resolved   ] [            ] [       ] [   50] wrap_mvn_org.neo4j_neo4j-graph-matching_1.7.2 (0)
      [1878] [Resolved   ] [            ] [       ] [   50] wrap_mvn_org.neo4j_neo4j-cypher_1.7.2_DynamicImport-Package__ (0)
      [1879] [Resolved   ] [            ] [       ] [   50] wrap_mvn_org.neo4j_neo4j-rest-graphdb_1.7_Import-Package_org.neo4j.__org.neo4j.server.plugins_resolution__optional_javax.transaction.__org.codehaus.__Require-Bundle_com.sun.jersey.core_com.sun.jersey.client (0)
      [1880] [Active     ] [            ] [       ] [   50] wrap_mvn_com.tinkerpop.blueprints_blueprints-core_1.2 (0)
      [1881] [Active     ] [            ] [       ] [   50] wrap_mvn_com.tinkerpop.blueprints_blueprints-neo4j-graph_1.2 (0)
      [1882] [Active     ] [            ] [       ] [   50] wrap_mvn_com.tinkerpop_frames_0.7_Import-Package_com.tinkerpop.blueprints.pgm___resolution__optional (0)
      [1883] [Active     ] [            ] [       ] [   50] wrap_mvn_net.coobird_thumbnailator_0.4.1 (0)
      [1885] [Active     ] [            ] [       ] [   50] org.apache.geronimo.specs.geronimo-validation_1.0_spec (1.1)
      [1886] [Active     ] [            ] [       ] [   50] wrap_mvn_org.picketlink.idm_picketlink-idm-common_1.5.0.Alpha02_Export-Package___version_1.5.0.Alpha02 (0)
      [1887] [Active     ] [            ] [       ] [   50] wrap_mvn_org.picketlink.idm_picketlink-idm-api_1.5.0.Alpha02_Export-Package___version_1.5.0.Alpha02 (0)
      [1889] [Active     ] [            ] [       ] [   30] org.apache.aries.jndi.api (1.0.0)
      [1890] [Active     ] [            ] [       ] [   30] org.apache.aries.jndi.core (1.0.0)
      [1891] [Active     ] [            ] [       ] [   30] org.apache.aries.jndi.rmi (1.0.0)
      [1892] [Active     ] [            ] [       ] [   30] org.apache.aries.jndi.url (1.0.0)
      [1893] [Active     ] [            ] [       ] [   30] org.apache.aries.jndi.legacy.support (1.0.0)
      [1894] [Active     ] [Created     ] [       ] [   30] org.apache.aries.transaction.blueprint (1.0.0)
      [1895] [Active     ] [            ] [       ] [   30] org.apache.aries.transaction.manager (1.0.1)
      [1896] [Active     ] [            ] [       ] [   50] org.apache.commons.dbcp (1.4)
      [1897] [Active     ] [            ] [       ] [   50] org.apache.servicemix.bundles.serp (1.13.1.4)
      [1986] [Active     ] [            ] [       ] [   50] jackson-core-asl (1.9.9)
      [1987] [Active     ] [            ] [       ] [   50] jackson-mapper-asl (1.9.9)
      [1988] [Active     ] [            ] [       ] [   50] joda-time (1.6.2)
      [1989] [Active     ] [            ] [       ] [   50] org.apache.geronimo.specs.geronimo-ejb_3.1_spec (1.0.2)
      [1990] [Active     ] [            ] [       ] [   50] org.apache.geronimo.specs.geronimo-jaxrpc_1.1_spec (2.0.0)
      [1991] [Active     ] [            ] [       ] [   50] javax.cache (0.4.0)
      [1992] [Active     ] [            ] [       ] [   50] wrap_mvn_com.github.spullara.mustache.java_compiler_0.8.2 (0)
      [1993] [Active     ] [            ] [       ] [   50] org.mongodb.mongo-java-driver (2.9.1.RELEASE)
      [1994] [Active     ] [            ] [       ] [   50] com.google.code.morphia (0.99.1.SNAPSHOT)
      [1995] [Active     ] [            ] [       ] [   50] wrap_mvn_com.google.code.morphia_morphia-logging-slf4j_0.99 (0)
      [1997] [Active     ] [            ] [       ] [   50] wrap_mvn_com.restfb_restfb_1.6.9 (0)
      [1998] [Active     ] [            ] [       ] [   50] org.apache.commons.email (1.2)
      [2000] [Active     ] [            ] [       ] [   50] wrap_mvn_org.apache.jena_jena-iri_0.9.3 (0)
      [2001] [Active     ] [            ] [       ] [   50] wrap_mvn_org.apache.jena_jena-core_2.7.3 (0)
      [2002] [Active     ] [            ] [       ] [   50] wrap_mvn_org.apache.jena_jena-arq_2.9.3 (0)
      [2003] [Active     ] [            ] [       ] [   50] wrap_mvn_net.sf.opencsv_opencsv_2.3 (0)
      [2028] [Active     ] [            ] [       ] [   80] com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider (2.1.0)
      [2033] [Active     ] [            ] [       ] [   30] org.apache.felix.eventadmin (1.3.0)
      [2035] [Active     ] [            ] [       ] [   30] org.apache.servicemix.bundles.aopalliance (1.0.0.6)
      [2036] [Active     ] [            ] [       ] [   30] org.springframework.core (3.0.7.RELEASE)
      [2037] [Active     ] [            ] [       ] [   30] org.springframework.asm (3.0.7.RELEASE)
      [2038] [Active     ] [            ] [       ] [   30] org.springframework.expression (3.0.7.RELEASE)
      [2039] [Active     ] [            ] [       ] [   30] org.springframework.beans (3.0.7.RELEASE)
      [2040] [Active     ] [            ] [       ] [   30] org.springframework.aop (3.0.7.RELEASE)
      [2041] [Active     ] [            ] [       ] [   30] org.springframework.context (3.0.7.RELEASE)
      [2043] [Active     ] [            ] [       ] [   30] org.springframework.context.support (3.0.7.RELEASE)
      [2046] [Active     ] [            ] [       ] [   30] org.apache.servicemix.bundles.cglib (2.2.2.1)
      [2047] [Active     ] [            ] [       ] [   30] org.springframework.osgi.io (1.2.1)
      [2048] [Active     ] [            ] [       ] [   30] org.springframework.osgi.core (1.2.1)
      [2049] [Active     ] [            ] [       ] [   30] org.springframework.osgi.extender (1.2.1)
      [2050] [Active     ] [            ] [       ] [   30] org.springframework.osgi.extensions.annotations (1.2.1)
      [2215] [Active     ] [            ] [       ] [    9] org.apache.geronimo.specs.geronimo-osgi-registry (1.1)
      [2216] [Active     ] [            ] [       ] [   10] org.apache.servicemix.specs.activation-api-1.1 (1.9.0)
      [2217] [Active     ] [            ] [       ] [   10] org.apache.geronimo.specs.geronimo-annotation_1.0_spec (1.1.1)
      [2218] [Active     ] [            ] [       ] [   10] org.apache.geronimo.specs.geronimo-ws-metadata_2.0_spec (1.1.3)
      [2219] [Active     ] [            ] [       ] [   10] org.apache.servicemix.specs.stax-api-1.0 (1.9.0)
      [2220] [Active     ] [            ] [       ] [   10] org.apache.servicemix.specs.jaxb-api-2.2 (1.9.0)
      [2221] [Active     ] [            ] [       ] [   10] org.apache.servicemix.specs.jaxws-api-2.2 (1.9.0)
      [2222] [Active     ] [            ] [       ] [   10] org.apache.servicemix.specs.saaj-api-1.3 (1.9.0)
      [2223] [Active     ] [            ] [       ] [   10] javax.mail (1.4.4)
      [2225] [Active     ] [            ] [       ] [   20] stax2-api (3.1.1)
      [2226] [Active     ] [            ] [       ] [   20] woodstox-core-asl (4.1.4)
      [2227] [Active     ] [            ] [       ] [   20] org.apache.servicemix.bundles.jaxb-impl (2.2.1.1_2)
      [2228] [Active     ] [            ] [       ] [   20] org.apache.servicemix.bundles.jaxb-xjc (2.2.1.1_2)
      [2310] [Installed  ] [            ] [       ] [   50] com.mysql.jdbc (5.1.21)
      [2311] [Installed  ] [            ] [       ] [   51] org.apache.openjpa (2.2.0)
      [2312] [Installed  ] [            ] [       ] [   80] wrap_mvn_org.neo4j_neo4j-kernel_1.8_Export-Package_org.neo4j.unsafe.batchinsert_neo4j-kernel__split__ (0)
      [2313] [Installed  ] [            ] [       ] [   80] wrap_mvn_org.neo4j_neo4j-lucene-index_1.8_Export-Package_org.neo4j.unsafe.batchinsert_neo4j-lucene-index__split__ (0)
      [2314] [Installed  ] [            ] [       ] [   80] wrap_mvn_org.neo4j_neo4j-graph-matching_1.8 (0)
      [2315] [Active     ] [            ] [       ] [   50] org.eclipse.emf.common (2.8.0.v20120911-0500)
      [2316] [Active     ] [            ] [       ] [   50] org.eclipse.emf.ecore (2.8.1.v20120911-0500)
      [2317] [Active     ] [            ] [       ] [   50] org.eclipse.emf.ecore.xmi (2.8.0.v20120911-0500)
      [2475] [Installed  ] [            ] [       ] [   50] wrap_mvn_org.apache.jena_jena-iri_0.9.4 (0)
      [2476] [Installed  ] [            ] [       ] [   50] wrap_mvn_org.apache.jena_jena-core_2.7.4 (0)
      [2477] [Installed  ] [            ] [       ] [   50] wrap_mvn_org.apache.jena_jena-arq_2.9.4 (0)
      [2482] [Active     ] [            ] [       ] [   40] org.apache.geronimo.specs.geronimo-annotation_1.1_spec (1.0.1)
      [2483] [Active     ] [            ] [       ] [   40] com.google.guava (13.0.1)
      [2484] [Active     ] [            ] [       ] [   40] org.apache.commons.io (2.4.0)
      [2485] [Active     ] [            ] [       ] [   40] org.apache.commons.lang3 (3.1.0)
      [2486] [Active     ] [            ] [       ] [   40] org.apache.commons.codec (1.7.0)
      [2487] [Active     ] [            ] [       ] [   40] org.apache.servicemix.bundles.xpp3 (1.1.0.4c_6)
      [2488] [Active     ] [            ] [       ] [   40] org.apache.servicemix.bundles.xstream (1.4.1.1)
      [2489] [Active     ] [            ] [       ] [   40] com.fasterxml.jackson.core.jackson-core (2.1.0)
      [2490] [Active     ] [            ] [       ] [   40] com.fasterxml.jackson.core.jackson-annotations (2.1.0)
      [2491] [Active     ] [            ] [       ] [   40] com.fasterxml.jackson.core.jackson-databind (2.1.0)
      [2492] [Active     ] [            ] [       ] [   40] joda-time (2.1)
      [2493] [Active     ] [            ] [       ] [   40] org.joda.money (0.6)
      [2494] [Active     ] [            ] [       ] [   40] com.fasterxml.jackson.datatype.jackson-datatype-joda (2.1.0)
      [2495] [Active     ] [            ] [       ] [   40] com.fasterxml.jackson.datatype.jackson-datatype-guava (2.1.0)
      [2496] [Active     ] [            ] [       ] [   40] org.apache.servicemix.bundles.commons-beanutils (1.8.3.1)
      [2497] [Active     ] [            ] [       ] [   30] org.apache.servicemix.bundles.cglib (2.1.0.3_7)
      [2498] [Active     ] [            ] [       ] [   50] org.apache.httpcomponents.httpcore (4.2.2)
      [2511] [Active     ] [            ] [       ] [   50] org.apache.httpcomponents.httpclient (4.2.2)
      [2513] [Installed  ] [            ] [       ] [   50] wrap_mvn_org.neo4j_neo4j-cypher_1.8_DynamicImport-Package__ (0)
      [2514] [Installed  ] [            ] [       ] [   50] wrap_mvn_org.neo4j_neo4j-rest-graphdb_1.8.RC2_DynamicImport-Package__ (0)
      [2583] [Active     ] [Created     ] [       ] [   80] org.soluvas.web.bootstrap (1.0.0.SNAPSHOT)
      [2584] [Active     ] [Created     ] [       ] [   80] com.soluvas.image.shell (1.0.0.SNAPSHOT)
      [2590] [Active     ] [Created     ] [       ] [   80] id.co.bippo.salesorder.rs (5.0.0.SNAPSHOT)
      [2592] [Active     ] [Created     ] [       ] [   80] id.co.bippo.web.mall (5.0.0.SNAPSHOT)
      [2593] [Active     ] [Created     ] [       ] [   80] id.co.bippo.salesorder (5.0.0.SNAPSHOT)
      [2596] [Active     ] [Created     ] [       ] [   80] org.soluvas.web.stomp (1.0.0.SNAPSHOT)
      [2597] [Active     ] [Created     ] [       ] [   80] berbatik_dev_image.xml (0.0.0)
      [2598] [Active     ] [Created     ] [       ] [   80] com.soluvas.data.shell (1.0.0.SNAPSHOT)
      [2601] [Active     ] [            ] [       ] [   80] com.berbatik.web (5.0.0.SNAPSHOT)
      [2604] [Active     ] [Created     ] [       ] [   80] berbatik_dev_ldap.xml (0.0.0)
      [2605] [Active     ] [Created     ] [       ] [   80] org.soluvas.web.nav.ui (1.0.0.SNAPSHOT)
      [2608] [Active     ] [Created     ] [       ] [   80] org.soluvas.web.nav (1.0.0.SNAPSHOT)
      [2611] [Active     ] [Created     ] [       ] [   80] com.soluvas.data (1.0.0.SNAPSHOT)
      [2613] [Active     ] [Created     ] [       ] [   80] org.soluvas.web.jqueryui (1.0.0.SNAPSHOT)
      [2614] [Active     ] [Created     ] [       ] [   80] id.co.bippo.web.sys (5.0.0.SNAPSHOT)
      [2615] [Active     ] [            ] [       ] [   80] com.berbatik.product (5.0.0.SNAPSHOT)
      [2616] [Active     ] [            ] [       ] [   80] com.berbatik.common (5.0.0.SNAPSHOT)
      [2618] [Active     ] [Created     ] [       ] [   80] id.co.bippo.shipping.shell (5.0.0.SNAPSHOT)
      [2621] [Active     ] [Created     ] [       ] [   80] berbatik_dev_graphdb.xml (0.0.0)
      [2623] [Active     ] [Created     ] [       ] [   80] id.co.bippo.web (5.0.0.SNAPSHOT)
      [2630] [Active     ] [Created     ] [       ] [   80] com.soluvas.cxf (1.0.0.SNAPSHOT)
      [2631] [Active     ] [Created     ] [       ] [   80] id.co.bippo.shipping.jne (5.0.0.SNAPSHOT)
      [2633] [Active     ] [Created     ] [       ] [   80] org.soluvas.web.nav.shell (1.0.0.SNAPSHOT)
      [2634] [Active     ] [Created     ] [       ] [   80] org.soluvas.web.jquery (1.0.0.SNAPSHOT)
      [2636] [Active     ] [Created     ] [       ] [   80] org.soluvas.web.jquerynotify (1.0.0.SNAPSHOT)
      [2639] [Active     ] [Created     ] [       ] [   80] berbatik_dev_app.xml (0.0.0)
      [2640] [Active     ] [Created     ] [       ] [   80] id.co.bippo.salesorder.shell (5.0.0.SNAPSHOT)
      [2641] [Active     ] [Created     ] [       ] [   80] com.soluvas.multitenant.shell (1.0.0.SNAPSHOT)
      [2664] [Active     ] [Created     ] [       ] [   80] org.soluvas.web.banner (1.0.0.SNAPSHOT)
      [2665] [Active     ] [Created     ] [       ] [   80] org.soluvas.web.backbone (1.0.0.SNAPSHOT)
      [2671] [Active     ] [Created     ] [       ] [   80] id.co.bippo.product.web.mall (5.0.0.SNAPSHOT)
      [2689] [Active     ] [            ] [       ] [   80] id.co.bippo.person (0.0.0)
      [2692] [Active     ] [            ] [       ] [   80] id.co.bippo.story (0.0.0)
      [2693] [Active     ] [            ] [       ] [   80] id.co.bippo.like (0.0.0)
      [2698] [Active     ] [Created     ] [       ] [   80] id.co.bippo.like (5.0.0.SNAPSHOT)
      [2699] [Active     ] [Created     ] [       ] [   80] id.co.bippo.shop (5.0.0.SNAPSHOT)
      [2700] [Active     ] [Created     ] [       ] [   80] id.co.bippo.person (5.0.0.SNAPSHOT)
      [2702] [Active     ] [Created     ] [       ] [   80] id.co.bippo.story (5.0.0.SNAPSHOT)
      [2703] [Active     ] [Created     ] [       ] [   80] id.co.bippo.comment (5.0.0.SNAPSHOT)
      [2705] [Active     ] [Created     ] [       ] [   80] id.co.bippo.wink (5.0.0.SNAPSHOT)
      [2707] [Active     ] [            ] [       ] [   80] commerce-features.xml (0.0.0)
      [2714] [Active     ] [Created     ] [       ] [   80] id.co.bippo.product (5.0.0.SNAPSHOT)
      [2728] [Active     ] [Created     ] [       ] [   80] id.co.bippo.wink.rs (5.0.0.SNAPSHOT)
      [2729] [Active     ] [Created     ] [       ] [   80] id.co.bippo.product.shell (5.0.0.SNAPSHOT)
      [2734] [Active     ] [Created     ] [       ] [   80] org.ops4j.pax.wicket.service (1.1.1)
      [2775] [Active     ] [            ] [       ] [   80] org.apache.shiro.core (1.2.1)
      [2776] [Active     ] [            ] [       ] [   80] org.apache.shiro.web (1.2.1)
      [2792] [Active     ] [Created     ] [       ] [   80] id.co.bippo.app (5.0.0.SNAPSHOT)
      [2794] [Active     ] [Created     ] [       ] [   80] id.co.bippo.story.rs (5.0.0.SNAPSHOT)
      [2797] [Active     ] [            ] [       ] [   80] org.apache.shiro.spring (1.2.1)
      [2803] [Installed  ] [            ] [       ] [   80] wrap_mvn_org.wicketstuff_wicketstuff-shiro_1.5.8 (0)
      [2818] [Active     ] [Created     ] [       ] [   80] id.co.bippo.common (5.0.0.SNAPSHOT)
      [2819] [Active     ] [Created     ] [       ] [   80] id.co.bippo.person.web.sys (5.0.0.SNAPSHOT)
      [2840] [Active     ] [Created     ] [       ] [   80] id.co.bippo.web.shop (5.0.0.SNAPSHOT)
      [2842] [Active     ] [Created     ] [       ] [   80] id.co.bippo.product.web.shop (5.0.0.SNAPSHOT)
      [2849] [Active     ] [Created     ] [       ] [   80] org.soluvas.web.login (1.0.0.SNAPSHOT)
      [2852] [Active     ] [Created     ] [       ] [   80] id.co.bippo.follow (5.0.0.SNAPSHOT)
      [2874] [Active     ] [            ] [       ] [   80] org.soluvas.data (2.0.0.SNAPSHOT)
      [2875] [Active     ] [Created     ] [       ] [   80] org.soluvas.security (2.0.0.SNAPSHOT)
      [2877] [Active     ] [Created     ] [       ] [   80] id.co.bippo.like.shell (5.0.0.SNAPSHOT)
      [2878] [Active     ] [Created     ] [       ] [   80] id.co.bippo.product.rs (5.0.0.SNAPSHOT)
      [2880] [Active     ] [            ] [       ] [   80] org.soluvas.cdi (2.0.0.SNAPSHOT)
      [2881] [Active     ] [            ] [       ] [   80] org.soluvas.push (2.0.0.SNAPSHOT)
      [2882] [Active     ] [Created     ] [       ] [   80] org.soluvas.commons (2.0.0.SNAPSHOT)
      [2883] [Active     ] [            ] [       ] [   80] org.soluvas.ldap (2.0.0.SNAPSHOT)
      [2884] [Active     ] [            ] [       ] [   80] org.soluvas.async (2.0.0.SNAPSHOT)
      [2886] [Active     ] [Created     ] [       ] [   80] org.soluvas.image (2.0.0.SNAPSHOT)
      [2887] [Active     ] [Created     ] [       ] [   80] org.soluvas.json (2.0.0.SNAPSHOT)
      [2889] [Active     ] [            ] [       ] [   80] org.soluvas.mongo (2.0.0.SNAPSHOT)
      [2890] [Active     ] [Created     ] [       ] [   80] org.soluvas.facebook (2.0.0.SNAPSHOT)
      [2895] [Active     ] [Created     ] [       ] [   80] id.co.bippo.web.pub (5.0.0.SNAPSHOT)
      [2896] [Active     ] [Created     ] [       ] [   80] id.co.bippo.product.web.sys (5.0.0.SNAPSHOT)
      [2899] [Active     ] [Created     ] [       ] [   80] id.co.bippo.person.web.mall (5.0.0.SNAPSHOT)
      [2901] [Active     ] [Created     ] [       ] [   80] id.co.bippo.salesorder.web (5.0.0.SNAPSHOT)
      [2902] [Active     ] [Created     ] [       ] [   80] id.co.bippo.person.shell (5.0.0.SNAPSHOT)
      [2904] [Active     ] [Created     ] [       ] [   80] id.co.bippo.like.rs (5.0.0.SNAPSHOT)
      [2905] [Active     ] [Created     ] [       ] [   80] id.co.bippo.follow.rs (5.0.0.SNAPSHOT)
      [2906] [Active     ] [Created     ] [       ] [   80] id.co.bippo.comment.rs (5.0.0.SNAPSHOT)
      [2959] [Active     ] [            ] [       ] [   50] com.mysema.commons.lang (0.2.4)
      [2960] [Active     ] [            ] [       ] [   50] com.mysema.querydsl.core (2.8.2)
      [2967] [Active     ] [            ] [       ] [   80] org.soluvas.jaxrs (2.0.0.SNAPSHOT)
      [2973] [Active     ] [Created     ] [       ] [   80] org.soluvas.web.site (1.0.0.SNAPSHOT)
      [2974] [Active     ] [Created     ] [       ] [   80] id.co.bippo.product.web.pub (5.0.0.SNAPSHOT)
      [2975] [Active     ] [Created     ] [       ] [   80] id.co.bippo.person.web.pub (5.0.0.SNAPSHOT)
      [2979] [Active     ] [Created     ] [       ] [   80] id.co.bippo.person.web.shop (5.0.0.SNAPSHOT)
      [2990] [Installed  ] [            ] [       ] [   80] com.typesafe.akka.actor (2.1.0.M1)
      [2991] [Active     ] [Created     ] [       ] [   80] id.co.bippo.shop.shell (5.0.0.SNAPSHOT)
      [2992] [Active     ] [Created     ] [       ] [   80] id.co.bippo.shop.web.sys (5.0.0.SNAPSHOT)
      [2993] [Active     ] [Created     ] [       ] [   80] id.co.bippo.shop.web.pub (5.0.0.SNAPSHOT)
      [2994] [Active     ] [Created     ] [       ] [   80] id.co.bippo.shop.web.shop (5.0.0.SNAPSHOT)
      [2995] [Active     ] [Created     ] [       ] [   80] id.co.bippo.shop.rs (5.0.0.SNAPSHOT)
      [3016] [Active     ] [Created     ] [       ] [   80] id.co.bippo.booking.rs (5.0.0.SNAPSHOT)
      [3017] [Active     ] [Created     ] [       ] [   80] id.co.bippo.booking (5.0.0.SNAPSHOT)
      [3018] [Active     ] [Created     ] [       ] [   80] berbatik_app.xml (0.0.0)
      [3019] [Active     ] [Failure     ] [       ] [   80] berbatik_ldap.xml (0.0.0)
      [3020] [Active     ] [Created     ] [       ] [   80] berbatik_backbone.xml (0.0.0)
      [3021] [Active     ] [Created     ] [       ] [   80] berbatik_graphdb.xml (0.0.0)
      [3022] [Active     ] [Failure     ] [       ] [   80] berbatik_security.xml (0.0.0)
      [3023] [Active     ] [Failure     ] [       ] [   80] berbatik_image.xml (0.0.0)
      [3024] [Active     ] [            ] [       ] [   30] org.apache.ws.xmlschema.core (2.0.3)
      [3025] [Active     ] [            ] [       ] [   30] org.apache.servicemix.bundles.wsdl4j (1.6.2.6)
      [3026] [Active     ] [            ] [       ] [   30] org.apache.servicemix.bundles.xmlresolver (1.2.0.5)
      [3027] [Active     ] [            ] [       ] [   30] org.apache.servicemix.bundles.fastinfoset (1.2.7.4)
      [3028] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.cxf-api (2.6.3)
      [3029] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.cxf-rt-core (2.6.3)
      [3030] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-management (2.6.3)
      [3031] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.karaf.cxf-karaf-commands (2.6.3)
      [3032] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-databinding-jaxb (2.6.3)
      [3033] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.cxf-rt-transports-http (2.6.3)
      [3034] [Active     ] [            ] [       ] [   30] org.codehaus.jettison.jettison (1.3.2)
      [3035] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-bindings-xml (2.6.3)
      [3036] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-rs-extension-providers (2.6.3)
      [3037] [Active     ] [            ] [       ] [   40] org.apache.cxf.cxf-rt-rs-extension-search (2.6.3)
      [3038] [Active     ] [Created     ] [       ] [   40] org.apache.cxf.cxf-rt-frontend-jaxrs (2.6.3)
      [3039] [Active     ] [Created     ] [       ] [   80] berbatik_rs.xml (0.0.0)
      

      Almost similar to #ARIES-959 but different line that throws NPE.

      1. UnitTest.tgz
        4 kB
        Torsten Mielke

        Issue Links

          Activity

          Hide
          Hendy Irawan added a comment -

          Refreshing the affected bundle (3019) gives this:

          2012-11-07 19:46:37,059 | ERROR | rint Extender: 2 | BlueprintContainerImpl           | ntainer.BlueprintContainerImpl$1  319 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_security.xml due to unresolved dependencies []
          java.util.concurrent.TimeoutException
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl$1.run(BlueprintContainerImpl.java:315)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
                  at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
                  at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
          2012-11-07 19:46:37,152 | ERROR | rint Extender: 3 | BlueprintContainerImpl           | ntainer.BlueprintContainerImpl$1  319 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_rs.xml due to unresolved dependencies []
          java.util.concurrent.TimeoutException
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl$1.run(BlueprintContainerImpl.java:315)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
                  at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
                  at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
          2012-11-07 19:46:57,952 | ERROR | rint Extender: 2 | BlueprintContainerImpl           | container.BlueprintContainerImpl  375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_ldap.xml
          java.lang.NullPointerException
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.getSatisfiableDependenciesMap(BlueprintContainerImpl.java:545)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.getSatisfiableDependenciesMap(BlueprintContainerImpl.java:537)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.trackServiceReferences(BlueprintContainerImpl.java:556)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:532)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:338)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
                  at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
                  at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
          

          The NullPointerException is almost similar to #ARIES-959.

          Show
          Hendy Irawan added a comment - Refreshing the affected bundle (3019) gives this: 2012-11-07 19:46:37,059 | ERROR | rint Extender: 2 | BlueprintContainerImpl | ntainer.BlueprintContainerImpl$1 319 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_security.xml due to unresolved dependencies [] java.util.concurrent.TimeoutException at org.apache.aries.blueprint.container.BlueprintContainerImpl$1.run(BlueprintContainerImpl.java:315)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07] at java.lang. Thread .run( Thread .java:722)[:1.7.0_07] 2012-11-07 19:46:37,152 | ERROR | rint Extender: 3 | BlueprintContainerImpl | ntainer.BlueprintContainerImpl$1 319 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_rs.xml due to unresolved dependencies [] java.util.concurrent.TimeoutException at org.apache.aries.blueprint.container.BlueprintContainerImpl$1.run(BlueprintContainerImpl.java:315)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07] at java.lang. Thread .run( Thread .java:722)[:1.7.0_07] 2012-11-07 19:46:57,952 | ERROR | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_ldap.xml java.lang.NullPointerException at org.apache.aries.blueprint.container.BlueprintContainerImpl.getSatisfiableDependenciesMap(BlueprintContainerImpl.java:545)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.getSatisfiableDependenciesMap(BlueprintContainerImpl.java:537)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.trackServiceReferences(BlueprintContainerImpl.java:556)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:532)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:338)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07] at java.lang. Thread .run( Thread .java:722)[:1.7.0_07] The NullPointerException is almost similar to # ARIES-959 .
          Hide
          Hendy Irawan added a comment -

          With the XML compacted to just this: (remove the ldapPool bean)

          <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
              xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0"
              xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
              	http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
              	http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0 http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0">
              
          	<cm:property-placeholder persistent-id="berbatik" update-strategy="reload">
          		<cm:default-properties>
          			<!-- Auth -->
          			<cm:property name="authLdapUri"				value="ldap://localhost:10389" />
          			<cm:property name="authLdapBindDn"			value="uid=admin,ou=system" />
          			<cm:property name="authLdapBindPassword"	value="secret" />
          		</cm:default-properties>
          	</cm:property-placeholder>
              
          	<bean id="ldapConfig" class="org.soluvas.ldap.LdapUtils" factory-method="createTrustingConfig">
          		<argument value="${authLdapUri}"/>
          		<argument value="${authLdapBindDn}"/>
          		<argument value="${authLdapBindPassword}"/>
          	</bean>
          	<service auto-export="interfaces">
          		<service-properties>
          			<entry key="clientId" value="${clientId}"/>
          			<entry key="tenantEnv" value="${tenantEnv}"/>
          			<entry key="tenantId" value="${tenantId}"/>
          			<entry key="suppliedClass" value="org.apache.directory.ldap.client.api.LdapConnectionConfig" />
          		</service-properties>
          		<bean class="com.google.common.base.Suppliers" factory-method="ofInstance">
          			<argument ref="ldapConfig" />
          		</bean>
          	</service>
          	<bean id="ldapConnFactory" class="org.apache.directory.ldap.client.api.PoolableLdapConnectionFactory"
          		depends-on="ldapConfig">
          		<argument ref="ldapConfig"/>
          	</bean>
          
          </blueprint>
          

          It now gives this: "org.osgi.service.blueprint.container.ComponentDefinitionException: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapConfig' could be found" which is very strange, that bean id exists!

          2012-11-07 19:54:22,360 | ERROR | rint Extender: 3 | BlueprintContainerImpl           | container.BlueprintContainerImpl  375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_ldap.xml
          org.osgi.service.blueprint.container.ComponentDefinitionException: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapConfig' could be found
                  at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:295)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:247)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:234)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.getClasses(ServiceRecipe.java:367)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:185)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:668)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:352)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
                  at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
                  at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
          Caused by: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapConfig' could be found
                  at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:55)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:268)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:280)[7:org.apache.aries.blueprint.core:1.0.1]
                  ... 16 more
          
          Show
          Hendy Irawan added a comment - With the XML compacted to just this: (remove the ldapPool bean) <blueprint xmlns= "http: //www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi= "http: //www.w3.org/2001/XMLSchema-instance" xmlns:cm= "http: //aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0" xmlns:ext= "http: //aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0" xsi:schemaLocation="http: //www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http: //aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http: //aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0 http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0"> <cm:property-placeholder persistent-id= "berbatik" update-strategy= "reload" > <cm: default -properties> <!-- Auth --> <cm:property name= "authLdapUri" value= "ldap: //localhost:10389" /> <cm:property name= "authLdapBindDn" value= "uid=admin,ou=system" /> <cm:property name= "authLdapBindPassword" value= "secret" /> </cm: default -properties> </cm:property-placeholder> <bean id= "ldapConfig" class= "org.soluvas.ldap.LdapUtils" factory-method= "createTrustingConfig" > <argument value= "${authLdapUri}" /> <argument value= "${authLdapBindDn}" /> <argument value= "${authLdapBindPassword}" /> </bean> <service auto-export= "interfaces" > <service-properties> <entry key= "clientId" value= "${clientId}" /> <entry key= "tenantEnv" value= "${tenantEnv}" /> <entry key= "tenantId" value= "${tenantId}" /> <entry key= "suppliedClass" value= "org.apache.directory.ldap.client.api.LdapConnectionConfig" /> </service-properties> <bean class= "com.google.common.base.Suppliers" factory-method= "ofInstance" > <argument ref= "ldapConfig" /> </bean> </service> <bean id= "ldapConnFactory" class= "org.apache.directory.ldap.client.api.PoolableLdapConnectionFactory" depends-on= "ldapConfig" > <argument ref= "ldapConfig" /> </bean> </blueprint> It now gives this: "org.osgi.service.blueprint.container.ComponentDefinitionException: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapConfig' could be found" which is very strange, that bean id exists! 2012-11-07 19:54:22,360 | ERROR | rint Extender: 3 | BlueprintContainerImpl | container.BlueprintContainerImpl 375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_ldap.xml org.osgi.service.blueprint.container.ComponentDefinitionException: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapConfig' could be found at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:295)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:247)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:234)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.getClasses(ServiceRecipe.java:367)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:185)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:668)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:352)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07] at java.lang. Thread .run( Thread .java:722)[:1.7.0_07] Caused by: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapConfig' could be found at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:55)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:268)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:280)[7:org.apache.aries.blueprint.core:1.0.1] ... 16 more
          Hide
          Hendy Irawan added a comment -

          If I comment the ldapConnFactory bean (leaving only one ldapConfig bean and the service), it works:

          karaf@root> bundle-services -p 3019
          
          berbatik_ldap.xml provides:
          ----------------------------------
          clientId = berbatik
          objectClass = [com.google.common.base.Supplier, java.io.Serializable]
          service.id = 762
          suppliedClass = org.apache.directory.ldap.client.api.LdapConnectionConfig
          tenantEnv = dev
          tenantId = berbatik
          ----
          objectClass = [org.osgi.service.blueprint.container.BlueprintContainer]
          osgi.blueprint.container.symbolicname = berbatik_ldap.xml
          osgi.blueprint.container.version = 0.0.0
          service.id = 763
          
          Show
          Hendy Irawan added a comment - If I comment the ldapConnFactory bean (leaving only one ldapConfig bean and the service), it works: karaf@root> bundle-services -p 3019 berbatik_ldap.xml provides: ---------------------------------- clientId = berbatik objectClass = [com.google.common.base.Supplier, java.io.Serializable] service.id = 762 suppliedClass = org.apache.directory.ldap.client.api.LdapConnectionConfig tenantEnv = dev tenantId = berbatik ---- objectClass = [org.osgi.service.blueprint.container.BlueprintContainer] osgi.blueprint.container.symbolicname = berbatik_ldap.xml osgi.blueprint.container.version = 0.0.0 service.id = 763
          Hide
          Hendy Irawan added a comment - - edited

          It turns out the behavior is not consistent.

          <bean id="ldapConfig" class="org.soluvas.ldap.LdapUtils" factory-method="createTrustingConfig">
          	<argument value="${authLdapUri}"/>
          	<argument value="${authLdapBindDn}"/>
          	<argument value="${authLdapBindPassword}"/>
          </bean>
          <service auto-export="interfaces">
          	<service-properties>
          		<entry key="clientId" value="${clientId}"/>
          		<entry key="tenantEnv" value="${tenantEnv}"/>
          		<entry key="tenantId" value="${tenantId}"/>
          		<entry key="suppliedClass" value="org.apache.directory.ldap.client.api.LdapConnectionConfig" />
          	</service-properties>
          	<bean class="com.google.common.base.Suppliers" factory-method="ofInstance">
          		<argument ref="ldapConfig" />
          	</bean>
          </service>
          

          With above Blueprint only containing the ldapConfig bean and the service exporter, stopping and starting (or refreshing) the Blueprint XML virtual bundle can give this error: (but not always, in my case, with 10 refreshes, 4 errors and goes to Failure state, 6 succeeds and goes to Created state)

          2012-11-07 20:01:28,482 | ERROR | rint Extender: 1 | ServiceRecipe                    | lueprint.container.ServiceRecipe  294 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Error retrieving service from ServiceRecipe[name='.component-1']
          org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapConfig' could be found
                  at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:55)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:268)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:280)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:247)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:234)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.getClasses(ServiceRecipe.java:367)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:185)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:668)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:352)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
                  at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
                  at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
          2012-11-07 20:01:28,483 | ERROR | rint Extender: 1 | ServiceRecipe                    | lueprint.container.ServiceRecipe  323 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Error retrieving service from ServiceRecipe[name='.component-1']
          org.osgi.service.blueprint.container.ComponentDefinitionException: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapConfig' could be found
                  at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:295)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:247)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:234)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.getClasses(ServiceRecipe.java:367)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:185)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:668)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:352)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
                  at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
                  at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
          Caused by: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapConfig' could be found
                  at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:55)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:268)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:280)[7:org.apache.aries.blueprint.core:1.0.1]
                  ... 16 more
          2012-11-07 20:01:28,484 | ERROR | rint Extender: 1 | BlueprintContainerImpl           | container.BlueprintContainerImpl  375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_ldap.xml
          org.osgi.service.blueprint.container.ComponentDefinitionException: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapConfig' could be found
                  at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:295)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:247)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:234)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.getClasses(ServiceRecipe.java:367)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:185)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:668)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:352)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
                  at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
                  at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
          Caused by: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapConfig' could be found
                  at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:55)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:268)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:280)[7:org.apache.aries.blueprint.core:1.0.1]
                  ... 16 more
          

          It maybe a problem in the blueprint deployer. I never experienced this bug when the blueprint XML is inside a real bundle.

          Show
          Hendy Irawan added a comment - - edited It turns out the behavior is not consistent. <bean id= "ldapConfig" class= "org.soluvas.ldap.LdapUtils" factory-method= "createTrustingConfig" > <argument value= "${authLdapUri}" /> <argument value= "${authLdapBindDn}" /> <argument value= "${authLdapBindPassword}" /> </bean> <service auto-export= "interfaces" > <service-properties> <entry key= "clientId" value= "${clientId}" /> <entry key= "tenantEnv" value= "${tenantEnv}" /> <entry key= "tenantId" value= "${tenantId}" /> <entry key= "suppliedClass" value= "org.apache.directory.ldap.client.api.LdapConnectionConfig" /> </service-properties> <bean class= "com.google.common.base.Suppliers" factory-method= "ofInstance" > <argument ref= "ldapConfig" /> </bean> </service> With above Blueprint only containing the ldapConfig bean and the service exporter, stopping and starting (or refreshing) the Blueprint XML virtual bundle can give this error: (but not always, in my case, with 10 refreshes, 4 errors and goes to Failure state, 6 succeeds and goes to Created state) 2012-11-07 20:01:28,482 | ERROR | rint Extender: 1 | ServiceRecipe | lueprint.container.ServiceRecipe 294 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Error retrieving service from ServiceRecipe[name='.component-1'] org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapConfig' could be found at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:55)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:268)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:280)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:247)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:234)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.getClasses(ServiceRecipe.java:367)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:185)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:668)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:352)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07] at java.lang. Thread .run( Thread .java:722)[:1.7.0_07] 2012-11-07 20:01:28,483 | ERROR | rint Extender: 1 | ServiceRecipe | lueprint.container.ServiceRecipe 323 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Error retrieving service from ServiceRecipe[name='.component-1'] org.osgi.service.blueprint.container.ComponentDefinitionException: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapConfig' could be found at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:295)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:247)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:234)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.getClasses(ServiceRecipe.java:367)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:185)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:668)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:352)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07] at java.lang. Thread .run( Thread .java:722)[:1.7.0_07] Caused by: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapConfig' could be found at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:55)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:268)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:280)[7:org.apache.aries.blueprint.core:1.0.1] ... 16 more 2012-11-07 20:01:28,484 | ERROR | rint Extender: 1 | BlueprintContainerImpl | container.BlueprintContainerImpl 375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_ldap.xml org.osgi.service.blueprint.container.ComponentDefinitionException: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapConfig' could be found at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:295)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:247)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:234)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.getClasses(ServiceRecipe.java:367)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:185)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:668)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:352)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07] at java.lang. Thread .run( Thread .java:722)[:1.7.0_07] Caused by: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'ldapConfig' could be found at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:55)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:268)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:280)[7:org.apache.aries.blueprint.core:1.0.1] ... 16 more It maybe a problem in the blueprint deployer. I never experienced this bug when the blueprint XML is inside a real bundle.
          Hide
          Hendy Irawan added a comment -

          Sometimes I get this, a different NPE:

          2012-11-07 20:18:40,001 | ERROR | rint Extender: 2 | BlueprintContainerImpl           | container.BlueprintContainerImpl  375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_ldap.xml
          java.lang.NullPointerException
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:657)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:352)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
                  at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
                  at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
          

          At least these NPEs should be checked i.e. throw a better exception, so the error message will be more helpful.

          I will be happy to test snapshot's if it's already fixed or there are better debug messages.

          Show
          Hendy Irawan added a comment - Sometimes I get this, a different NPE: 2012-11-07 20:18:40,001 | ERROR | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_ldap.xml java.lang.NullPointerException at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:657)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:352)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07] at java.lang. Thread .run( Thread .java:722)[:1.7.0_07] At least these NPEs should be checked i.e. throw a better exception, so the error message will be more helpful. I will be happy to test snapshot's if it's already fixed or there are better debug messages.
          Hide
          Hendy Irawan added a comment -

          Self note: trigger tagged at ARIES-961 at bippo-commerce5 git repo.

          Show
          Hendy Irawan added a comment - Self note: trigger tagged at ARIES-961 at bippo-commerce5 git repo.
          Hide
          Hendy Irawan added a comment -

          Sometimes I get this: an NPE without any explanation whatsoever!

          2012-11-07 20:22:41,409 | ERROR | rint Extender: 3 | BlueprintContainerImpl           | container.BlueprintContainerImpl  375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_ldap.xml
          java.lang.NullPointerException
          
          Show
          Hendy Irawan added a comment - Sometimes I get this: an NPE without any explanation whatsoever! 2012-11-07 20:22:41,409 | ERROR | rint Extender: 3 | BlueprintContainerImpl | container.BlueprintContainerImpl 375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_ldap.xml java.lang.NullPointerException
          Hide
          Hendy Irawan added a comment -

          Sometimes I get this, yet another different NPE (how come??)

          2012-11-07 20:22:42,149 | ERROR | rint Extender: 1 | BlueprintContainerImpl           | container.BlueprintContainerImpl  375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_ldap.xml
          java.lang.NullPointerException
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.getMissingDependencies(BlueprintContainerImpl.java:695)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:342)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
                  at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
                  at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
          
          Show
          Hendy Irawan added a comment - Sometimes I get this, yet another different NPE (how come??) 2012-11-07 20:22:42,149 | ERROR | rint Extender: 1 | BlueprintContainerImpl | container.BlueprintContainerImpl 375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_ldap.xml java.lang.NullPointerException at org.apache.aries.blueprint.container.BlueprintContainerImpl.getMissingDependencies(BlueprintContainerImpl.java:695)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:342)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07] at java.lang. Thread .run( Thread .java:722)[:1.7.0_07]
          Hide
          Hendy Irawan added a comment -

          From the blueprint core 1.0.1 BlueprintContainerImpl code:

                      for (String name : tmpRepo.getNames()) {
                          if (repository.getInstance(name) == null) {                // NPE here
                              LOGGER.debug("Adding new recipe {}", new Object[] { name });
                              Recipe r = tmpRepo.getRecipe(name);
                              if (r != null) {
                                  repository.putRecipe(name, r);
                              }
          

          it seems "repository" instance field went null during the call.

          Looking through the source, there are several places where repository can be set (including to null):

          namespaceHandlerUnregistered(URI uri):

              public void namespaceHandlerUnregistered(URI uri) {
                  if (namespaces != null && namespaces.contains(uri)) {
                      tidyupComponents();
                      this.componentDefinitionRegistry.reset();
                      this.repository = null;
          

          reload:

              public void reload() {
                  tidyupComponents();
                  this.componentDefinitionRegistry.reset();
                  this.repository = null;
          

          getRepository():

              public BlueprintRepository getRepository() {
                  if (repository == null) {
                      repository = new RecipeBuilder(this, tempRecipeIdSpace).createRepository();
          

          I think access to repository should be synchronized.

          BTW in my case the error is not consistent, sometimes a refresh can be successful too.

          Show
          Hendy Irawan added a comment - From the blueprint core 1.0.1 BlueprintContainerImpl code: for ( String name : tmpRepo.getNames()) { if (repository.getInstance(name) == null ) { // NPE here LOGGER.debug( "Adding new recipe {}" , new Object [] { name }); Recipe r = tmpRepo.getRecipe(name); if (r != null ) { repository.putRecipe(name, r); } it seems "repository" instance field went null during the call. Looking through the source, there are several places where repository can be set (including to null): namespaceHandlerUnregistered(URI uri): public void namespaceHandlerUnregistered(URI uri) { if (namespaces != null && namespaces.contains(uri)) { tidyupComponents(); this .componentDefinitionRegistry.reset(); this .repository = null ; reload: public void reload() { tidyupComponents(); this .componentDefinitionRegistry.reset(); this .repository = null ; getRepository(): public BlueprintRepository getRepository() { if (repository == null ) { repository = new RecipeBuilder( this , tempRecipeIdSpace).createRepository(); I think access to repository should be synchronized. BTW in my case the error is not consistent, sometimes a refresh can be successful too.
          Hide
          Hendy Irawan added a comment - - edited

          After attempting to patch Blueprint, it seems many places in BlueprintContainerImpl assumes repository instance is always available, but in reality repository can be null.

          This is probably the one particularly tricky (almost patched code):

          case Populated:
              getRepository();
              final Runnable r;
              synchronized (repositoryRef) {
              	final BlueprintRepository repository = repositoryRef.get();
                  trackServiceReferences(repository);
                  r = new Runnable() {
                      public void run() {
                          synchronized (scheduled) {
                              Throwable t = new TimeoutException();
                              state = State.Failed;
                              String[] missingDependecies = getMissingDependencies(repository);
                              tidyupComponents(repository);
                              LOGGER.error("Unable to start blueprint container for bundle " + bundleContext.getBundle().getSymbolicName() + " due to unresolved dependencies " + Arrays.asList(missingDependecies), t);
                              eventDispatcher.blueprintEvent(new BlueprintEvent(BlueprintEvent.FAILURE, getBundleContext().getBundle(), getExtenderBundle(), missingDependecies, t));
                          }
                      }
                  };
              }
              timeoutFuture = executors.schedule(r, timeout, TimeUnit.MILLISECONDS);
              state = State.WaitForInitialReferences;
          

          It schedules a Runnable which expects the repository to still exist... no guarantees I guess.

          My next attempt is this:

          case Populated:
              getRepository();
              synchronized (repositoryRef) {
              	final BlueprintRepository repository = repositoryRef.get();
                  trackServiceReferences(repository);
              }
              final Runnable r = new Runnable() {
                  public void run() {
                      synchronized (scheduled) {
                      	synchronized (repositoryRef) {
                      		final BlueprintRepository repository = repositoryRef.get();
                              Throwable t = new TimeoutException();
                              state = State.Failed;
                              String[] missingDependecies = getMissingDependencies(repository);
                              tidyupComponents(repository);
                              LOGGER.error("Unable to start blueprint container for bundle " + bundleContext.getBundle().getSymbolicName() + " due to unresolved dependencies " + Arrays.asList(missingDependecies), t);
                              eventDispatcher.blueprintEvent(new BlueprintEvent(BlueprintEvent.FAILURE, getBundleContext().getBundle(), getExtenderBundle(), missingDependecies, t));
                      	}
                      }
                  }
              };
              timeoutFuture = executors.schedule(r, timeout, TimeUnit.MILLISECONDS);
              state = State.WaitForInitialReferences;
          

          All I can think is there should be much less mutable state for all this to be more manageable. And much more 'final'.

          Show
          Hendy Irawan added a comment - - edited After attempting to patch Blueprint, it seems many places in BlueprintContainerImpl assumes repository instance is always available, but in reality repository can be null. This is probably the one particularly tricky (almost patched code): case Populated: getRepository(); final Runnable r; synchronized (repositoryRef) { final BlueprintRepository repository = repositoryRef.get(); trackServiceReferences(repository); r = new Runnable () { public void run() { synchronized (scheduled) { Throwable t = new TimeoutException(); state = State.Failed; String [] missingDependecies = getMissingDependencies(repository); tidyupComponents(repository); LOGGER.error( "Unable to start blueprint container for bundle " + bundleContext.getBundle().getSymbolicName() + " due to unresolved dependencies " + Arrays.asList(missingDependecies), t); eventDispatcher.blueprintEvent( new BlueprintEvent(BlueprintEvent.FAILURE, getBundleContext().getBundle(), getExtenderBundle(), missingDependecies, t)); } } }; } timeoutFuture = executors.schedule(r, timeout, TimeUnit.MILLISECONDS); state = State.WaitForInitialReferences; It schedules a Runnable which expects the repository to still exist... no guarantees I guess. My next attempt is this: case Populated: getRepository(); synchronized (repositoryRef) { final BlueprintRepository repository = repositoryRef.get(); trackServiceReferences(repository); } final Runnable r = new Runnable () { public void run() { synchronized (scheduled) { synchronized (repositoryRef) { final BlueprintRepository repository = repositoryRef.get(); Throwable t = new TimeoutException(); state = State.Failed; String [] missingDependecies = getMissingDependencies(repository); tidyupComponents(repository); LOGGER.error( "Unable to start blueprint container for bundle " + bundleContext.getBundle().getSymbolicName() + " due to unresolved dependencies " + Arrays.asList(missingDependecies), t); eventDispatcher.blueprintEvent( new BlueprintEvent(BlueprintEvent.FAILURE, getBundleContext().getBundle(), getExtenderBundle(), missingDependecies, t)); } } } }; timeoutFuture = executors.schedule(r, timeout, TimeUnit.MILLISECONDS); state = State.WaitForInitialReferences; All I can think is there should be much less mutable state for all this to be more manageable. And much more 'final'.
          Hide
          Hendy Irawan added a comment -

          Wow... it seems I'm running around in circles with BlueprintContainerImpl.

          This is not trivial to fix... esp. that I'm not familiar with BlueprintContainerImpl inner workings.

          Show
          Hendy Irawan added a comment - Wow... it seems I'm running around in circles with BlueprintContainerImpl. This is not trivial to fix... esp. that I'm not familiar with BlueprintContainerImpl inner workings.
          Hide
          Hendy Irawan added a comment -

          I suspect it's due to State. Maybe State needs to be synchronized ?

          Show
          Hendy Irawan added a comment - I suspect it's due to State. Maybe State needs to be synchronized ?
          Hide
          Hendy Irawan added a comment -

          It seems reload() is the culprit, by modifying to :

          public void reload() {
              synchronized (repositoryRef) {
              	final BlueprintRepository oldRepository = repositoryRef.get();
                  tidyupComponents(oldRepository);
                  this.componentDefinitionRegistry.reset();
                  LOGGER.warn("Setting repository of {} to null due to reload. State={}",
                  		bundleContext.getBundle().getSymbolicName(), state);
                  this.repositoryRef.set(null);
                  this.processors = new ArrayList<Processor>();
                  timeout = 5 * 60 * 1000;
                  waitForDependencies = true;
                  xmlValidation = true;
                  state = State.Unknown;
                  schedule();
              }
          }
          

          and

              private void registerServices() {
              	synchronized (repositoryRef) {
                      final BlueprintRepository repository = repositoryRef.get();
                      if (repository == null) {
                      	LOGGER.warn("Repository for bundle {} suddenly gone", bundleContext.getBundle().getSymbolicName());
                      }
          

          I get the partial log :

          2012-11-08 00:53:39,136 | WARN  | Thread-140       | BlueprintContainerImpl           | container.BlueprintContainerImpl  238 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Setting repository of berbatik_security.xml to null due to reload. State=Create
          2012-11-08 00:53:39,137 | WARN  | rint Extender: 2 | BlueprintContainerImpl           | container.BlueprintContainerImpl  706 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Repository for bundle berbatik_security.xml suddenly gone
          2012-11-08 00:53:39,138 | ERROR | rint Extender: 2 | BlueprintContainerImpl           | container.BlueprintContainerImpl  395 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_security.xml
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:708)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:370)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:258)[7:org.apache.aries.blueprint.core:1.0.1]
          

          So reload() is called, which sets repository null, and schedules a proper reload, but then registerServices() kicks in, expects a repository to be there but in fact null.

          Show
          Hendy Irawan added a comment - It seems reload() is the culprit, by modifying to : public void reload() { synchronized (repositoryRef) { final BlueprintRepository oldRepository = repositoryRef.get(); tidyupComponents(oldRepository); this .componentDefinitionRegistry.reset(); LOGGER.warn( "Setting repository of {} to null due to reload. State={}" , bundleContext.getBundle().getSymbolicName(), state); this .repositoryRef.set( null ); this .processors = new ArrayList<Processor>(); timeout = 5 * 60 * 1000; waitForDependencies = true ; xmlValidation = true ; state = State.Unknown; schedule(); } } and private void registerServices() { synchronized (repositoryRef) { final BlueprintRepository repository = repositoryRef.get(); if (repository == null ) { LOGGER.warn( "Repository for bundle {} suddenly gone" , bundleContext.getBundle().getSymbolicName()); } I get the partial log : 2012-11-08 00:53:39,136 | WARN | Thread -140 | BlueprintContainerImpl | container.BlueprintContainerImpl 238 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Setting repository of berbatik_security.xml to null due to reload. State=Create 2012-11-08 00:53:39,137 | WARN | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 706 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Repository for bundle berbatik_security.xml suddenly gone 2012-11-08 00:53:39,138 | ERROR | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 395 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_security.xml at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:708)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:370)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:258)[7:org.apache.aries.blueprint.core:1.0.1] So reload() is called, which sets repository null, and schedules a proper reload, but then registerServices() kicks in, expects a repository to be there but in fact null.
          Hide
          Hendy Irawan added a comment -

          When the refresh succeeds, this is what happened during reload():

          2012-11-08 00:57:59,490 | WARN  | Thread-156       | BlueprintContainerImpl           | container.BlueprintContainerImpl  238 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Setting repository of berbatik_backbone.xml to null due to reload. State=Created
          

          When the refresh fails, this is what happened during reload():

          2012-11-08 00:59:09,378 | WARN  | Thread-187       | BlueprintContainerImpl           | container.BlueprintContainerImpl  238 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Setting repository of berbatik_backbone.xml to null due to reload. State=Create                    
          

          So it seems that if reload() is called during state=Create, then it should wait until it goes to another stable state e.g. Created.

          BTW the synchronized blocks and AtomicRef really makes blueprint slower...

          Show
          Hendy Irawan added a comment - When the refresh succeeds, this is what happened during reload(): 2012-11-08 00:57:59,490 | WARN | Thread -156 | BlueprintContainerImpl | container.BlueprintContainerImpl 238 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Setting repository of berbatik_backbone.xml to null due to reload. State=Created When the refresh fails, this is what happened during reload(): 2012-11-08 00:59:09,378 | WARN | Thread -187 | BlueprintContainerImpl | container.BlueprintContainerImpl 238 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Setting repository of berbatik_backbone.xml to null due to reload. State=Create So it seems that if reload() is called during state=Create, then it should wait until it goes to another stable state e.g. Created. BTW the synchronized blocks and AtomicRef really makes blueprint slower...
          Hide
          Hendy Irawan added a comment -

          By replacing reload() with:

          private class Reload implements Runnable {
          	public void run() {
              	if (state == State.Create) {
                      LOGGER.warn("Delaying reload of {} due to state={}",
                      		bundleContext.getBundle().getSymbolicName(), state);
              		executors.schedule(this, 50, TimeUnit.MILLISECONDS);
              	} else {
              		LOGGER.warn("Reloading {}, state={}",
                      		bundleContext.getBundle().getSymbolicName(), state);
          	        synchronized (repositoryRef) {
          	        	final BlueprintRepository oldRepository = repositoryRef.get();
          		        tidyupComponents(oldRepository);
          		        BlueprintContainerImpl.this.componentDefinitionRegistry.reset();
          	            LOGGER.warn("Setting repository of {} to null due to reload. State={}",
          	            		bundleContext.getBundle().getSymbolicName(), state);
          	            BlueprintContainerImpl.this.repositoryRef.set(null);
          	            BlueprintContainerImpl.this.processors = new ArrayList<Processor>();
          		        timeout = 5 * 60 * 1000;
          		        waitForDependencies = true;
          		        xmlValidation = true;
          		        state = State.Unknown;
          		        schedule();
          	        }
              	}
          	}
          }
          

          I got this:

          2012-11-08 01:05:51,069 | WARN  | rint Extender: 3 | BlueprintContainerImpl           | er.BlueprintContainerImpl$Reload  124 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Reloading berbatik_backbone.xml, state=InitialReferencesSatisfied
          2012-11-08 01:05:51,083 | WARN  | rint Extender: 3 | BlueprintContainerImpl           | er.BlueprintContainerImpl$Reload  130 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Setting repository of berbatik_backbone.xml to null due to reload. State=Create
          2012-11-08 01:05:51,084 | WARN  | rint Extender: 2 | BlueprintContainerImpl           | container.BlueprintContainerImpl  720 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Repository for bundle berbatik_backbone.xml suddenly gone
          2012-11-08 01:05:51,085 | ERROR | rint Extender: 2 | BlueprintContainerImpl           | container.BlueprintContainerImpl  409 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_backbone.xml
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:712)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:385)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:272)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:708)[7:org.apache.aries.blueprint.core:1.0.1]
          

          So even during (inside) a reload(), state can change.....

          Show
          Hendy Irawan added a comment - By replacing reload() with: private class Reload implements Runnable { public void run() { if (state == State.Create) { LOGGER.warn( "Delaying reload of {} due to state={}" , bundleContext.getBundle().getSymbolicName(), state); executors.schedule( this , 50, TimeUnit.MILLISECONDS); } else { LOGGER.warn( "Reloading {}, state={}" , bundleContext.getBundle().getSymbolicName(), state); synchronized (repositoryRef) { final BlueprintRepository oldRepository = repositoryRef.get(); tidyupComponents(oldRepository); BlueprintContainerImpl. this .componentDefinitionRegistry.reset(); LOGGER.warn( "Setting repository of {} to null due to reload. State={}" , bundleContext.getBundle().getSymbolicName(), state); BlueprintContainerImpl. this .repositoryRef.set( null ); BlueprintContainerImpl. this .processors = new ArrayList<Processor>(); timeout = 5 * 60 * 1000; waitForDependencies = true ; xmlValidation = true ; state = State.Unknown; schedule(); } } } } I got this: 2012-11-08 01:05:51,069 | WARN | rint Extender: 3 | BlueprintContainerImpl | er.BlueprintContainerImpl$Reload 124 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Reloading berbatik_backbone.xml, state=InitialReferencesSatisfied 2012-11-08 01:05:51,083 | WARN | rint Extender: 3 | BlueprintContainerImpl | er.BlueprintContainerImpl$Reload 130 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Setting repository of berbatik_backbone.xml to null due to reload. State=Create 2012-11-08 01:05:51,084 | WARN | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 720 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Repository for bundle berbatik_backbone.xml suddenly gone 2012-11-08 01:05:51,085 | ERROR | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 409 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_backbone.xml at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:712)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:385)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:272)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:708)[7:org.apache.aries.blueprint.core:1.0.1] So even during (inside) a reload(), state can change.....
          Hide
          Hendy Irawan added a comment -

          Probably a different approach : STM ? Will this help: http://multiverse.codehaus.org/overview.html ?

          Show
          Hendy Irawan added a comment - Probably a different approach : STM ? Will this help: http://multiverse.codehaus.org/overview.html ?
          Hide
          Hendy Irawan added a comment - - edited

          I somewhat succeeded at making the impl more stable by wrapping State in AtomicReference and using synchronized during potential modification of state.

          From about 50% fails it's down now to about 1 fail in 20 tries.

          When it fails it throws this:

          2012-11-08 11:37:12,828 | ERROR | rint Extender: 2 | BlueprintContainerImpl           | container.BlueprintContainerImpl  457 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_ldap.xml, state was Create
          java.lang.IllegalStateException: Can only register services while bundle is active or activating.
                  at org.apache.felix.framework.Felix.registerService(Felix.java:3209)[org.apache.felix.framework-4.0.3.jar:]
                  at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:346)[org.apache.felix.framework-4.0.3.jar:]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerService(BlueprintContainerImpl.java:506)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:191)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:754)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:427)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:268)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
                  at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
                  at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
          

          but even so it seems the bundle is still Created properly.

          Self note: Tagged in git as 'state-atomicref-13492945'.

          Show
          Hendy Irawan added a comment - - edited I somewhat succeeded at making the impl more stable by wrapping State in AtomicReference and using synchronized during potential modification of state. From about 50% fails it's down now to about 1 fail in 20 tries. When it fails it throws this: 2012-11-08 11:37:12,828 | ERROR | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 457 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_ldap.xml, state was Create java.lang.IllegalStateException: Can only register services while bundle is active or activating. at org.apache.felix.framework.Felix.registerService(Felix.java:3209)[org.apache.felix.framework-4.0.3.jar:] at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:346)[org.apache.felix.framework-4.0.3.jar:] at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerService(BlueprintContainerImpl.java:506)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:191)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:754)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:427)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:268)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07] at java.lang. Thread .run( Thread .java:722)[:1.7.0_07] but even so it seems the bundle is still Created properly. Self note: Tagged in git as 'state-atomicref-13492945'.
          Hide
          Hendy Irawan added a comment -

          Still can go into the infinite "Stopping" state

          Show
          Hendy Irawan added a comment - Still can go into the infinite "Stopping" state
          Hide
          Hendy Irawan added a comment - - edited

          Probably http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html or STM will help here.

          current best attempt using AtomicReference on state :

          diff --git a/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java b/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java
          index 87d6e3a..827b05a 100644
          --- a/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java
          +++ b/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java
          @@ -44,6 +44,7 @@ import java.util.concurrent.ScheduledFuture;
           import java.util.concurrent.TimeUnit;
           import java.util.concurrent.TimeoutException;
           import java.util.concurrent.atomic.AtomicBoolean;
          +import java.util.concurrent.atomic.AtomicReference;
           
           import org.apache.aries.blueprint.BlueprintConstants;
           import org.apache.aries.blueprint.ComponentDefinitionRegistryProcessor;
          @@ -134,7 +135,7 @@ public class BlueprintContainerImpl
               private final AggregateConverter converter;
               private final ScheduledExecutorService executors;
               private Set<URI> namespaces;
          -    private State state = State.Unknown;
          +    private final AtomicReference<State> stateRef = new AtomicReference<State>(State.Unknown);
               private NamespaceHandlerSet handlerSet;
               private boolean destroyed;
               private Parser parser;
          @@ -153,7 +154,7 @@ public class BlueprintContainerImpl
               private List<ServiceRecipe> services;
               private AccessControlContext accessControlContext;
               private final IdSpace tempRecipeIdSpace = new IdSpace();
          -    private ProxyManager proxyManager;
          +    private final ProxyManager proxyManager;
           
               public BlueprintContainerImpl(BundleContext bundleContext, Bundle extenderBundle, BlueprintListener eventDispatcher,
                                             NamespaceHandlerRegistry handlers, ScheduledExecutorService executors, List<Object> pathList, ProxyManager proxyManager) {
          @@ -228,17 +229,32 @@ public class BlueprintContainerImpl
                       executors.submit(this);
                   }
               }
          +    
          +    private class Reload implements Runnable {
          +       public void run() {
          +               synchronized (stateRef) {
          +                       final State oldState = stateRef.get();
          +                               if (oldState == State.Create || oldState == State.InitialReferencesSatisfied) {
          +                                       LOGGER.debug("Scheduling reload, {} state is {}", bundleContext.getBundle().getSymbolicName(), oldState);
          +                                       executors.schedule(new Reload(), 10, TimeUnit.MILLISECONDS);
          +                               } else {
          +                                       LOGGER.debug("Reloading {}, state is {}", bundleContext.getBundle().getSymbolicName(), oldState);
          +                       tidyupComponents();
          +                       BlueprintContainerImpl.this.componentDefinitionRegistry.reset();
          +                       BlueprintContainerImpl.this.repository = null;
          +                       BlueprintContainerImpl.this.processors = new ArrayList<Processor>();
          +                       timeout = 5 * 60 * 1000;
          +                       waitForDependencies = true;
          +                       xmlValidation = true;
          +                       stateRef.set( State.Unknown );
          +                       schedule();
          +                               }
          +                       }
          +       }
          +    }
           
               public void reload() {
          -        tidyupComponents();
          -        this.componentDefinitionRegistry.reset();
          -        this.repository = null;
          -        this.processors = new ArrayList<Processor>();
          -        timeout = 5 * 60 * 1000;
          -        waitForDependencies = true;
          -        xmlValidation = true;
          -        state = State.Unknown;
          -        schedule();
          +       executors.submit(new Reload());
               }
           
               public void run() {
          @@ -269,110 +285,179 @@ public class BlueprintContainerImpl
                           if (destroyed) {
                               return;
                           }
          -                LOGGER.debug("Running blueprint container for bundle {} in state {}", bundleContext.getBundle().getSymbolicName(), state);
          -                switch (state) {
          -                    case Unknown:
          -                        readDirectives();
          -                        eventDispatcher.blueprintEvent(new BlueprintEvent(BlueprintEvent.CREATING, getBundleContext().getBundle(), getExtenderBundle()));
          -                        parser = new Parser();
          -                        parser.parse(getResources());
          -                        namespaces = parser.getNamespaces();
          -                        handlerSet = handlers.getNamespaceHandlers(namespaces, getBundleContext().getBundle());
          -                        handlerSet.addListener(this);
          -                        state = State.WaitForNamespaceHandlers;
          -                    case WaitForNamespaceHandlers:
          -                    {
          -                        List<String> missing = new ArrayList<String>();
          -                        List<URI> missingURIs = new ArrayList<URI>();
          -                        for (URI ns : namespaces) {
          -                            if (handlerSet.getNamespaceHandler(ns) == null) {
          -                                missing.add("(&(" + Constants.OBJECTCLASS + "=" + NamespaceHandler.class.getName() + ")(" + NamespaceHandlerRegistryImpl.NAMESPACE + "=" + ns + "))");
          -                                missingURIs.add(ns);
          -                            }
          -                        }
          -                        if (missing.size() > 0) {
          -                            LOGGER.info("Bundle {} is waiting for namespace handlers {}", bundleContext.getBundle().getSymbolicName(), missingURIs);
          -                            eventDispatcher.blueprintEvent(new BlueprintEvent(BlueprintEvent.GRACE_PERIOD, getBundleContext().getBundle(), getExtenderBundle(), missing.toArray(new String[missing.size()])));
          -                            return;
          -                        }
          -                        componentDefinitionRegistry.reset();
          -                        componentDefinitionRegistry.registerComponentDefinition(new PassThroughMetadataImpl("blueprintContainer", this));
          -                        componentDefinitionRegistry.registerComponentDefinition(new PassThroughMetadataImpl("blueprintBundle", bundleContext.getBundle()));
          -                        componentDefinitionRegistry.registerComponentDefinition(new PassThroughMetadataImpl("blueprintBundleContext", bundleContext));
          -                        componentDefinitionRegistry.registerComponentDefinition(new PassThroughMetadataImpl("blueprintConverter", converter));
          -                        if (xmlValidation) {
          -                            parser.validate(handlerSet.getSchema());
          -                        }
          -                        parser.populate(handlerSet, componentDefinitionRegistry);
          -                        state = State.Populated;
          -                    }
          -                    case Populated:
          -                        getRepository();
          -                        trackServiceReferences();
          -                        Runnable r = new Runnable() {
          -                            public void run() {
          -                                synchronized (scheduled) {
          -                                    Throwable t = new TimeoutException();
          -                                    state = State.Failed;
          -                                    String[] missingDependecies = getMissingDependencies();
          -                                    tidyupComponents();
          -                                    LOGGER.error("Unable to start blueprint container for bundle " + bundleContext.getBundle().getSymbolicName() + " due to unresolved dependencies " + Arrays.asList(missingDependecies), t);
          -                                    eventDispatcher.blueprintEvent(new BlueprintEvent(BlueprintEvent.FAILURE, getBundleContext().getBundle(), getExtenderBundle(), missingDependecies, t));
          -                                }
          -                            }
          -                        };
          -                        timeoutFuture = executors.schedule(r, timeout, TimeUnit.MILLISECONDS);
          -                        state = State.WaitForInitialReferences;
          -                    case WaitForInitialReferences:
          -                        if (waitForDependencies) {
          -                            String[] missingDependencies = getMissingDependencies();
          -                            if (missingDependencies.length > 0) {
          -                                LOGGER.info("Bundle {} is waiting for dependencies {}", bundleContext.getBundle().getSymbolicName(), Arrays.asList(missingDependencies));
          -                                eventDispatcher.blueprintEvent(new BlueprintEvent(BlueprintEvent.GRACE_PERIOD, getBundleContext().getBundle(), getExtenderBundle(), missingDependencies));
          -                                return;
          -                            }
          -                        }
          -                        state = State.InitialReferencesSatisfied;
          -                    case InitialReferencesSatisfied:
          -                        processTypeConverters();
          -                        processProcessors();
          -                        state = State.WaitForInitialReferences2;
          -                    case WaitForInitialReferences2:
          -                        if (waitForDependencies) {
          -                            String[] missingDependencies = getMissingDependencies();
          -                            if (missingDependencies.length > 0) {
          -                                LOGGER.info("Bundle {} is waiting for dependencies {}", bundleContext.getBundle().getSymbolicName(), Arrays.asList(missingDependencies));
          -                                eventDispatcher.blueprintEvent(new BlueprintEvent(BlueprintEvent.GRACE_PERIOD, getBundleContext().getBundle(), getExtenderBundle(), missingDependencies));
          -                                return;
          -                            }
          -                        }                       
          -                        state = State.Create;
          -                    case Create:
          -                        cancelFutureIfPresent();
          -                        registerServices();
          -                        instantiateEagerComponents();
          -                        // Register the BlueprintContainer in the OSGi registry
          -                        int bs = bundleContext.getBundle().getState();
          -                        if (registration == null && (bs == Bundle.ACTIVE || bs == Bundle.STARTING)) {
          -                            Properties props = new Properties();
          -                            props.put(BlueprintConstants.CONTAINER_SYMBOLIC_NAME_PROPERTY,
          -                                      bundleContext.getBundle().getSymbolicName());
          -                            props.put(BlueprintConstants.CONTAINER_VERSION_PROPERTY,
          -                                      JavaUtils.getBundleVersion(bundleContext.getBundle()));
          -                            registration = registerService(new String [] { BlueprintContainer.class.getName() }, this, props);
          -                        }
          -                        eventDispatcher.blueprintEvent(new BlueprintEvent(BlueprintEvent.CREATED, getBundleContext().getBundle(), getExtenderBundle()));
          -                        state = State.Created;
          -                    case Created:
          -                    case Failed:
          -                        return;
          -                }
          +                LOGGER.debug("Running blueprint container for bundle {} in state {}", bundleContext.getBundle().getSymbolicName(), stateRef.get());
          +                synchronized (stateRef) {
          +                    final State state = stateRef.get();
          +                                       switch (state) {
          +                                       case Unknown:
          +                                               readDirectives();
          +                                               eventDispatcher.blueprintEvent(new BlueprintEvent(
          +                                                               BlueprintEvent.CREATING, getBundleContext()
          +                                                                               .getBundle(), getExtenderBundle()));
          +                                               parser = new Parser();
          +                                               parser.parse(getResources());
          +                                               namespaces = parser.getNamespaces();
          +                                               handlerSet = handlers.getNamespaceHandlers(namespaces,
          +                                                               getBundleContext().getBundle());
          +                                               handlerSet.addListener(this);
          +                                               stateRef.set(State.WaitForNamespaceHandlers);
          +                                       case WaitForNamespaceHandlers: {
          +                                               List<String> missing = new ArrayList<String>();
          +                                               List<URI> missingURIs = new ArrayList<URI>();
          +                                               for (URI ns : namespaces) {
          +                                                       if (handlerSet.getNamespaceHandler(ns) == null) {
          +                                                               missing.add("(&("
          +                                                                               + Constants.OBJECTCLASS
          +                                                                               + "="
          +                                                                               + NamespaceHandler.class.getName()
          +                                                                               + ")("
          +                                                                               + NamespaceHandlerRegistryImpl.NAMESPACE
          +                                                                               + "=" + ns + "))");
          +                                                               missingURIs.add(ns);
          +                                                       }
          +                                               }
          +                                               if (missing.size() > 0) {
          +                                                       LOGGER.info(
          +                                                                       "Bundle {} is waiting for namespace handlers {}",
          +                                                                       bundleContext.getBundle().getSymbolicName(),
          +                                                                       missingURIs);
          +                                                       eventDispatcher
          +                                                                       .blueprintEvent(new BlueprintEvent(
          +                                                                                       BlueprintEvent.GRACE_PERIOD,
          +                                                                                       getBundleContext().getBundle(),
          +                                                                                       getExtenderBundle(), missing
          +                                                                                         .toArray(new String[missing
          +                                                                                         .size()])));
          +                                                       return;
          +                                               }
          +                                               componentDefinitionRegistry.reset();
          +                                               componentDefinitionRegistry
          +                                                               .registerComponentDefinition(new PassThroughMetadataImpl(
          +                                                                               "blueprintContainer", this));
          +                                               componentDefinitionRegistry
          +                                                               .registerComponentDefinition(new PassThroughMetadataImpl(
          +                                                                               "blueprintBundle", bundleContext
          +                                                                                         .getBundle()));
          +                                               componentDefinitionRegistry
          +                                                               .registerComponentDefinition(new PassThroughMetadataImpl(
          +                                                                               "blueprintBundleContext", bundleContext));
          +                                               componentDefinitionRegistry
          +                                                               .registerComponentDefinition(new PassThroughMetadataImpl(
          +                                                                               "blueprintConverter", converter));
          +                                               if (xmlValidation) {
          +                                                       parser.validate(handlerSet.getSchema());
          +                                               }
          +                                               parser.populate(handlerSet, componentDefinitionRegistry);
          +                                               stateRef.set(State.Populated);
          +                                       }
          +                                       case Populated:
          +                                               getRepository();
          +                                               trackServiceReferences();
          +                                               Runnable r = new Runnable() {
          +                                                       public void run() {
          +                                                               synchronized (scheduled) {
          +                                                                       Throwable t = new TimeoutException();
          +                                                                       stateRef.set(State.Failed);
          +                                                                       String[] missingDependecies = getMissingDependencies();
          +                                                                       tidyupComponents();
          +                                                                       LOGGER.error(
          +                                                                                       "Unable to start blueprint container for bundle "
          +                                                                                         + bundleContext.getBundle()
          +                                                                                         .getSymbolicName()
          +                                                                                         + " due to unresolved dependencies "
          +                                                                                         + Arrays.asList(missingDependecies),
          +                                                                                       t);
          +                                                                       eventDispatcher
          +                                                                                       .blueprintEvent(new BlueprintEvent(
          +                                                                                         BlueprintEvent.FAILURE,
          +                                                                                         getBundleContext()
          +                                                                                         .getBundle(),
          +                                                                                         getExtenderBundle(),
          +                                                                                         missingDependecies, t));
          +                                                               }
          +                                                       }
          +                                               };
          +                                               timeoutFuture = executors.schedule(r, timeout,
          +                                                               TimeUnit.MILLISECONDS);
          +                                               stateRef.set(State.WaitForInitialReferences);
          +                                       case WaitForInitialReferences:
          +                                               if (waitForDependencies) {
          +                                                       String[] missingDependencies = getMissingDependencies();
          +                                                       if (missingDependencies.length > 0) {
          +                                                               LOGGER.info(
          +                                                                               "Bundle {} is waiting for dependencies {}",
          +                                                                               bundleContext.getBundle()
          +                                                                                         .getSymbolicName(), Arrays
          +                                                                                         .asList(missingDependencies));
          +                                                               eventDispatcher
          +                                                                               .blueprintEvent(new BlueprintEvent(
          +                                                                                         BlueprintEvent.GRACE_PERIOD,
          +                                                                                         getBundleContext().getBundle(),
          +                                                                                         getExtenderBundle(),
          +                                                                                         missingDependencies));
          +                                                               return;
          +                                                       }
          +                                               }
          +                                               stateRef.set(State.InitialReferencesSatisfied);
          +                                       case InitialReferencesSatisfied:
          +                                               processTypeConverters();
          +                                               processProcessors();
          +                                               stateRef.set(State.WaitForInitialReferences2);
          +                                       case WaitForInitialReferences2:
          +                                               if (waitForDependencies) {
          +                                                       String[] missingDependencies = getMissingDependencies();
          +                                                       if (missingDependencies.length > 0) {
          +                                                               LOGGER.info(
          +                                                                               "Bundle {} is waiting for dependencies {}",
          +                                                                               bundleContext.getBundle()
          +                                                                                         .getSymbolicName(), Arrays
          +                                                                                         .asList(missingDependencies));
          +                                                               eventDispatcher
          +                                                                               .blueprintEvent(new BlueprintEvent(
          +                                                                                         BlueprintEvent.GRACE_PERIOD,
          +                                                                                         getBundleContext().getBundle(),
          +                                                                                         getExtenderBundle(),
          +                                                                                         missingDependencies));
          +                                                               return;
          +                                                       }
          +                                               }
          +                                               stateRef.set(State.Create);
          +                                       case Create:
          +                                               cancelFutureIfPresent();
          +                                               registerServices();
          +                                               instantiateEagerComponents();
          +                                               // Register the BlueprintContainer in the OSGi registry
          +                                               int bs = bundleContext.getBundle().getState();
          +                                               if (registration == null
          +                                                               && (bs == Bundle.ACTIVE || bs == Bundle.STARTING)) {
          +                                                       Properties props = new Properties();
          +                                                       props.put(
          +                                                                       BlueprintConstants.CONTAINER_SYMBOLIC_NAME_PROPERTY,
          +                                                                       bundleContext.getBundle().getSymbolicName());
          +                                                       props.put(
          +                                                                       BlueprintConstants.CONTAINER_VERSION_PROPERTY,
          +                                                                       JavaUtils.getBundleVersion(bundleContext
          +                                                                                       .getBundle()));
          +                                                       registration = registerService(
          +                                                                       new String[] { BlueprintContainer.class
          +                                                                                       .getName() },
          +                                                                       this, props);
          +                                               }
          +                                               eventDispatcher.blueprintEvent(new BlueprintEvent(
          +                                                               BlueprintEvent.CREATED, getBundleContext()
          +                                                                               .getBundle(), getExtenderBundle()));
          +                                               stateRef.set(State.Created);
          +                                       case Created:
          +                                       case Failed:
          +                                               return;
          +                                       }
          +                               }
                       }
                   } catch (Throwable t) {
          -            state = State.Failed;
          -            cancelFutureIfPresent();
          +            LOGGER.error("Unable to start blueprint container for bundle " + bundleContext.getBundle().getSymbolicName() + ", state was " + stateRef.get(), t);
          +                       stateRef.set(State.Failed);
          +                       cancelFutureIfPresent();
                       tidyupComponents();
          -            LOGGER.error("Unable to start blueprint container for bundle " + bundleContext.getBundle().getSymbolicName(), t);
                       eventDispatcher.blueprintEvent(new BlueprintEvent(BlueprintEvent.FAILURE, getBundleContext().getBundle(), getExtenderBundle(), t));
                   }
               }
          @@ -598,6 +683,7 @@ public class BlueprintContainerImpl
               public void notifySatisfaction(SatisfiableRecipe satisfiable) {
                   LOGGER.debug("Notified satisfaction {} in bundle {}: {}",
                           new Object[] { satisfiable.getName(), bundleContext.getBundle().getSymbolicName(), satisfiable.isSatisfied() });
          +        final State state = stateRef.get();
                   if (state == State.Create || state == State.Created ) {
                       Map<String, List<SatisfiableRecipe>> dependencies = getSatisfiableDependenciesMap();
                       for (Map.Entry<String, List<SatisfiableRecipe>> entry : dependencies.entrySet()) {
          @@ -873,11 +959,15 @@ public class BlueprintContainerImpl
           
               public void namespaceHandlerUnregistered(URI uri) {
                   if (namespaces != null && namespaces.contains(uri)) {
          -            tidyupComponents();
          -            this.componentDefinitionRegistry.reset();
          -            this.repository = null;
          -            state = State.WaitForNamespaceHandlers;
          -            schedule();
          +               LOGGER.debug("Namespace handler unregistered in {} for {}, state={}", new Object[] {
          +                               bundleContext.getBundle().getSymbolicName(), uri, stateRef.get() });
          +            synchronized (stateRef) {
          +                               tidyupComponents();
          +                               this.componentDefinitionRegistry.reset();
          +                               this.repository = null;
          +                               stateRef.set(State.WaitForNamespaceHandlers);
          +                               schedule();
          +                       }
                   }
               }
           
          @@ -891,7 +981,7 @@ public class BlueprintContainerImpl
               public void injectBeanInstance(BeanMetadata bmd, Object o) 
                   throws IllegalArgumentException, ComponentDefinitionException {
                   ExecutionContext origContext 
          -            = ExecutionContext.Holder.setContext((ExecutionContext)getRepository());
          +            = ExecutionContext.Holder.setContext(getRepository());
                   try {
                       ComponentMetadata cmd = componentDefinitionRegistry.getComponentDefinition(bmd.getId());
                       if (cmd == null || cmd != bmd) {
          

          I wish now I have the time to continue attempting this fix, but unfortunately I have other priority.

          But still I'm very keen to get back on this thing...

          Show
          Hendy Irawan added a comment - - edited Probably http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/locks/ReentrantReadWriteLock.html or STM will help here. current best attempt using AtomicReference on state : diff --git a/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java b/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java index 87d6e3a..827b05a 100644 --- a/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java +++ b/src/main/java/org/apache/aries/blueprint/container/BlueprintContainerImpl.java @@ -44,6 +44,7 @@ import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; + import java.util.concurrent.atomic.AtomicReference; import org.apache.aries.blueprint.BlueprintConstants; import org.apache.aries.blueprint.ComponentDefinitionRegistryProcessor; @@ -134,7 +135,7 @@ public class BlueprintContainerImpl private final AggregateConverter converter; private final ScheduledExecutorService executors; private Set<URI> namespaces; - private State state = State.Unknown; + private final AtomicReference<State> stateRef = new AtomicReference<State>(State.Unknown); private NamespaceHandlerSet handlerSet; private boolean destroyed; private Parser parser; @@ -153,7 +154,7 @@ public class BlueprintContainerImpl private List<ServiceRecipe> services; private AccessControlContext accessControlContext; private final IdSpace tempRecipeIdSpace = new IdSpace(); - private ProxyManager proxyManager; + private final ProxyManager proxyManager; public BlueprintContainerImpl(BundleContext bundleContext, Bundle extenderBundle, BlueprintListener eventDispatcher, NamespaceHandlerRegistry handlers, ScheduledExecutorService executors, List< Object > pathList, ProxyManager proxyManager) { @@ -228,17 +229,32 @@ public class BlueprintContainerImpl executors.submit( this ); } } + + private class Reload implements Runnable { + public void run() { + synchronized (stateRef) { + final State oldState = stateRef.get(); + if (oldState == State.Create || oldState == State.InitialReferencesSatisfied) { + LOGGER.debug( "Scheduling reload, {} state is {}" , bundleContext.getBundle().getSymbolicName(), oldState); + executors.schedule( new Reload(), 10, TimeUnit.MILLISECONDS); + } else { + LOGGER.debug( "Reloading {}, state is {}" , bundleContext.getBundle().getSymbolicName(), oldState); + tidyupComponents(); + BlueprintContainerImpl. this .componentDefinitionRegistry.reset(); + BlueprintContainerImpl. this .repository = null ; + BlueprintContainerImpl. this .processors = new ArrayList<Processor>(); + timeout = 5 * 60 * 1000; + waitForDependencies = true ; + xmlValidation = true ; + stateRef.set( State.Unknown ); + schedule(); + } + } + } + } public void reload() { - tidyupComponents(); - this .componentDefinitionRegistry.reset(); - this .repository = null ; - this .processors = new ArrayList<Processor>(); - timeout = 5 * 60 * 1000; - waitForDependencies = true ; - xmlValidation = true ; - state = State.Unknown; - schedule(); + executors.submit( new Reload()); } public void run() { @@ -269,110 +285,179 @@ public class BlueprintContainerImpl if (destroyed) { return ; } - LOGGER.debug( "Running blueprint container for bundle {} in state {}" , bundleContext.getBundle().getSymbolicName(), state); - switch (state) { - case Unknown: - readDirectives(); - eventDispatcher.blueprintEvent( new BlueprintEvent(BlueprintEvent.CREATING, getBundleContext().getBundle(), getExtenderBundle())); - parser = new Parser(); - parser.parse(getResources()); - namespaces = parser.getNamespaces(); - handlerSet = handlers.getNamespaceHandlers(namespaces, getBundleContext().getBundle()); - handlerSet.addListener( this ); - state = State.WaitForNamespaceHandlers; - case WaitForNamespaceHandlers: - { - List< String > missing = new ArrayList< String >(); - List<URI> missingURIs = new ArrayList<URI>(); - for (URI ns : namespaces) { - if (handlerSet.getNamespaceHandler(ns) == null ) { - missing.add( "(&(" + Constants.OBJECTCLASS + "=" + NamespaceHandler.class.getName() + ")(" + NamespaceHandlerRegistryImpl.NAMESPACE + "=" + ns + "))" ); - missingURIs.add(ns); - } - } - if (missing.size() > 0) { - LOGGER.info( "Bundle {} is waiting for namespace handlers {}" , bundleContext.getBundle().getSymbolicName(), missingURIs); - eventDispatcher.blueprintEvent( new BlueprintEvent(BlueprintEvent.GRACE_PERIOD, getBundleContext().getBundle(), getExtenderBundle(), missing.toArray( new String [missing.size()]))); - return ; - } - componentDefinitionRegistry.reset(); - componentDefinitionRegistry.registerComponentDefinition( new PassThroughMetadataImpl( "blueprintContainer" , this )); - componentDefinitionRegistry.registerComponentDefinition( new PassThroughMetadataImpl( "blueprintBundle" , bundleContext.getBundle())); - componentDefinitionRegistry.registerComponentDefinition( new PassThroughMetadataImpl( "blueprintBundleContext" , bundleContext)); - componentDefinitionRegistry.registerComponentDefinition( new PassThroughMetadataImpl( "blueprintConverter" , converter)); - if (xmlValidation) { - parser.validate(handlerSet.getSchema()); - } - parser.populate(handlerSet, componentDefinitionRegistry); - state = State.Populated; - } - case Populated: - getRepository(); - trackServiceReferences(); - Runnable r = new Runnable () { - public void run() { - synchronized (scheduled) { - Throwable t = new TimeoutException(); - state = State.Failed; - String [] missingDependecies = getMissingDependencies(); - tidyupComponents(); - LOGGER.error( "Unable to start blueprint container for bundle " + bundleContext.getBundle().getSymbolicName() + " due to unresolved dependencies " + Arrays.asList(missingDependecies), t); - eventDispatcher.blueprintEvent( new BlueprintEvent(BlueprintEvent.FAILURE, getBundleContext().getBundle(), getExtenderBundle(), missingDependecies, t)); - } - } - }; - timeoutFuture = executors.schedule(r, timeout, TimeUnit.MILLISECONDS); - state = State.WaitForInitialReferences; - case WaitForInitialReferences: - if (waitForDependencies) { - String [] missingDependencies = getMissingDependencies(); - if (missingDependencies.length > 0) { - LOGGER.info( "Bundle {} is waiting for dependencies {}" , bundleContext.getBundle().getSymbolicName(), Arrays.asList(missingDependencies)); - eventDispatcher.blueprintEvent( new BlueprintEvent(BlueprintEvent.GRACE_PERIOD, getBundleContext().getBundle(), getExtenderBundle(), missingDependencies)); - return ; - } - } - state = State.InitialReferencesSatisfied; - case InitialReferencesSatisfied: - processTypeConverters(); - processProcessors(); - state = State.WaitForInitialReferences2; - case WaitForInitialReferences2: - if (waitForDependencies) { - String [] missingDependencies = getMissingDependencies(); - if (missingDependencies.length > 0) { - LOGGER.info( "Bundle {} is waiting for dependencies {}" , bundleContext.getBundle().getSymbolicName(), Arrays.asList(missingDependencies)); - eventDispatcher.blueprintEvent( new BlueprintEvent(BlueprintEvent.GRACE_PERIOD, getBundleContext().getBundle(), getExtenderBundle(), missingDependencies)); - return ; - } - } - state = State.Create; - case Create: - cancelFutureIfPresent(); - registerServices(); - instantiateEagerComponents(); - // Register the BlueprintContainer in the OSGi registry - int bs = bundleContext.getBundle().getState(); - if (registration == null && (bs == Bundle.ACTIVE || bs == Bundle.STARTING)) { - Properties props = new Properties(); - props.put(BlueprintConstants.CONTAINER_SYMBOLIC_NAME_PROPERTY, - bundleContext.getBundle().getSymbolicName()); - props.put(BlueprintConstants.CONTAINER_VERSION_PROPERTY, - JavaUtils.getBundleVersion(bundleContext.getBundle())); - registration = registerService( new String [] { BlueprintContainer.class.getName() }, this , props); - } - eventDispatcher.blueprintEvent( new BlueprintEvent(BlueprintEvent.CREATED, getBundleContext().getBundle(), getExtenderBundle())); - state = State.Created; - case Created: - case Failed: - return ; - } + LOGGER.debug( "Running blueprint container for bundle {} in state {}" , bundleContext.getBundle().getSymbolicName(), stateRef.get()); + synchronized (stateRef) { + final State state = stateRef.get(); + switch (state) { + case Unknown: + readDirectives(); + eventDispatcher.blueprintEvent( new BlueprintEvent( + BlueprintEvent.CREATING, getBundleContext() + .getBundle(), getExtenderBundle())); + parser = new Parser(); + parser.parse(getResources()); + namespaces = parser.getNamespaces(); + handlerSet = handlers.getNamespaceHandlers(namespaces, + getBundleContext().getBundle()); + handlerSet.addListener( this ); + stateRef.set(State.WaitForNamespaceHandlers); + case WaitForNamespaceHandlers: { + List< String > missing = new ArrayList< String >(); + List<URI> missingURIs = new ArrayList<URI>(); + for (URI ns : namespaces) { + if (handlerSet.getNamespaceHandler(ns) == null ) { + missing.add( "(&(" + + Constants.OBJECTCLASS + + "=" + + NamespaceHandler.class.getName() + + ")(" + + NamespaceHandlerRegistryImpl.NAMESPACE + + "=" + ns + "))" ); + missingURIs.add(ns); + } + } + if (missing.size() > 0) { + LOGGER.info( + "Bundle {} is waiting for namespace handlers {}" , + bundleContext.getBundle().getSymbolicName(), + missingURIs); + eventDispatcher + .blueprintEvent( new BlueprintEvent( + BlueprintEvent.GRACE_PERIOD, + getBundleContext().getBundle(), + getExtenderBundle(), missing + .toArray( new String [missing + .size()]))); + return ; + } + componentDefinitionRegistry.reset(); + componentDefinitionRegistry + .registerComponentDefinition( new PassThroughMetadataImpl( + "blueprintContainer" , this )); + componentDefinitionRegistry + .registerComponentDefinition( new PassThroughMetadataImpl( + "blueprintBundle" , bundleContext + .getBundle())); + componentDefinitionRegistry + .registerComponentDefinition( new PassThroughMetadataImpl( + "blueprintBundleContext" , bundleContext)); + componentDefinitionRegistry + .registerComponentDefinition( new PassThroughMetadataImpl( + "blueprintConverter" , converter)); + if (xmlValidation) { + parser.validate(handlerSet.getSchema()); + } + parser.populate(handlerSet, componentDefinitionRegistry); + stateRef.set(State.Populated); + } + case Populated: + getRepository(); + trackServiceReferences(); + Runnable r = new Runnable () { + public void run() { + synchronized (scheduled) { + Throwable t = new TimeoutException(); + stateRef.set(State.Failed); + String [] missingDependecies = getMissingDependencies(); + tidyupComponents(); + LOGGER.error( + "Unable to start blueprint container for bundle " + + bundleContext.getBundle() + .getSymbolicName() + + " due to unresolved dependencies " + + Arrays.asList(missingDependecies), + t); + eventDispatcher + .blueprintEvent( new BlueprintEvent( + BlueprintEvent.FAILURE, + getBundleContext() + .getBundle(), + getExtenderBundle(), + missingDependecies, t)); + } + } + }; + timeoutFuture = executors.schedule(r, timeout, + TimeUnit.MILLISECONDS); + stateRef.set(State.WaitForInitialReferences); + case WaitForInitialReferences: + if (waitForDependencies) { + String [] missingDependencies = getMissingDependencies(); + if (missingDependencies.length > 0) { + LOGGER.info( + "Bundle {} is waiting for dependencies {}" , + bundleContext.getBundle() + .getSymbolicName(), Arrays + .asList(missingDependencies)); + eventDispatcher + .blueprintEvent( new BlueprintEvent( + BlueprintEvent.GRACE_PERIOD, + getBundleContext().getBundle(), + getExtenderBundle(), + missingDependencies)); + return ; + } + } + stateRef.set(State.InitialReferencesSatisfied); + case InitialReferencesSatisfied: + processTypeConverters(); + processProcessors(); + stateRef.set(State.WaitForInitialReferences2); + case WaitForInitialReferences2: + if (waitForDependencies) { + String [] missingDependencies = getMissingDependencies(); + if (missingDependencies.length > 0) { + LOGGER.info( + "Bundle {} is waiting for dependencies {}" , + bundleContext.getBundle() + .getSymbolicName(), Arrays + .asList(missingDependencies)); + eventDispatcher + .blueprintEvent( new BlueprintEvent( + BlueprintEvent.GRACE_PERIOD, + getBundleContext().getBundle(), + getExtenderBundle(), + missingDependencies)); + return ; + } + } + stateRef.set(State.Create); + case Create: + cancelFutureIfPresent(); + registerServices(); + instantiateEagerComponents(); + // Register the BlueprintContainer in the OSGi registry + int bs = bundleContext.getBundle().getState(); + if (registration == null + && (bs == Bundle.ACTIVE || bs == Bundle.STARTING)) { + Properties props = new Properties(); + props.put( + BlueprintConstants.CONTAINER_SYMBOLIC_NAME_PROPERTY, + bundleContext.getBundle().getSymbolicName()); + props.put( + BlueprintConstants.CONTAINER_VERSION_PROPERTY, + JavaUtils.getBundleVersion(bundleContext + .getBundle())); + registration = registerService( + new String [] { BlueprintContainer.class + .getName() }, + this , props); + } + eventDispatcher.blueprintEvent( new BlueprintEvent( + BlueprintEvent.CREATED, getBundleContext() + .getBundle(), getExtenderBundle())); + stateRef.set(State.Created); + case Created: + case Failed: + return ; + } + } } } catch (Throwable t) { - state = State.Failed; - cancelFutureIfPresent(); + LOGGER.error( "Unable to start blueprint container for bundle " + bundleContext.getBundle().getSymbolicName() + ", state was " + stateRef.get(), t); + stateRef.set(State.Failed); + cancelFutureIfPresent(); tidyupComponents(); - LOGGER.error( "Unable to start blueprint container for bundle " + bundleContext.getBundle().getSymbolicName(), t); eventDispatcher.blueprintEvent( new BlueprintEvent(BlueprintEvent.FAILURE, getBundleContext().getBundle(), getExtenderBundle(), t)); } } @@ -598,6 +683,7 @@ public class BlueprintContainerImpl public void notifySatisfaction(SatisfiableRecipe satisfiable) { LOGGER.debug( "Notified satisfaction {} in bundle {}: {}" , new Object [] { satisfiable.getName(), bundleContext.getBundle().getSymbolicName(), satisfiable.isSatisfied() }); + final State state = stateRef.get(); if (state == State.Create || state == State.Created ) { Map< String , List<SatisfiableRecipe>> dependencies = getSatisfiableDependenciesMap(); for (Map.Entry< String , List<SatisfiableRecipe>> entry : dependencies.entrySet()) { @@ -873,11 +959,15 @@ public class BlueprintContainerImpl public void namespaceHandlerUnregistered(URI uri) { if (namespaces != null && namespaces.contains(uri)) { - tidyupComponents(); - this .componentDefinitionRegistry.reset(); - this .repository = null ; - state = State.WaitForNamespaceHandlers; - schedule(); + LOGGER.debug( "Namespace handler unregistered in {} for {}, state={}" , new Object [] { + bundleContext.getBundle().getSymbolicName(), uri, stateRef.get() }); + synchronized (stateRef) { + tidyupComponents(); + this .componentDefinitionRegistry.reset(); + this .repository = null ; + stateRef.set(State.WaitForNamespaceHandlers); + schedule(); + } } } @@ -891,7 +981,7 @@ public class BlueprintContainerImpl public void injectBeanInstance(BeanMetadata bmd, Object o) throws IllegalArgumentException, ComponentDefinitionException { ExecutionContext origContext - = ExecutionContext.Holder.setContext((ExecutionContext)getRepository()); + = ExecutionContext.Holder.setContext(getRepository()); try { ComponentMetadata cmd = componentDefinitionRegistry.getComponentDefinition(bmd.getId()); if (cmd == null || cmd != bmd) { I wish now I have the time to continue attempting this fix, but unfortunately I have other priority. But still I'm very keen to get back on this thing...
          Hide
          Hendy Irawan added a comment -

          Basically 80% of the culprit is reload(). If it can behave "emphatically" or be aware that something else is still working, then a lot of ground is already covered.

          Show
          Hendy Irawan added a comment - Basically 80% of the culprit is reload(). If it can behave "emphatically" or be aware that something else is still working, then a lot of ground is already covered.
          Hide
          Hendy Irawan added a comment -

          Ironically, a workaround is to use Spring-DM (I love Karaf!!), which so far works perfectly:

          [3040] [Active     ] [Created     ] [       ] [   80] berbatik_app.xml (0.0.0)
          [3042] [Active     ] [Failure     ] [       ] [   80] berbatik_backbone.xml (0.0.0)
          [3043] [Active     ] [Failure     ] [       ] [   80] berbatik_graphdb.xml (0.0.0)
          [3044] [Active     ] [Failure     ] [       ] [   80] berbatik_security.xml (0.0.0)
          [3045] [Active     ] [Failure     ] [       ] [   80] berbatik_rs.xml (0.0.0)
          [3046] [Active     ] [Failure     ] [       ] [   80] berbatik_image.xml (0.0.0)
          [3048] [Active     ] [            ] [Started] [   80] berbatik_ldap.xml (0.0.0)          <-- Spring-DM 
          
          Show
          Hendy Irawan added a comment - Ironically, a workaround is to use Spring-DM (I love Karaf!!), which so far works perfectly: [3040] [Active ] [Created ] [ ] [ 80] berbatik_app.xml (0.0.0) [3042] [Active ] [Failure ] [ ] [ 80] berbatik_backbone.xml (0.0.0) [3043] [Active ] [Failure ] [ ] [ 80] berbatik_graphdb.xml (0.0.0) [3044] [Active ] [Failure ] [ ] [ 80] berbatik_security.xml (0.0.0) [3045] [Active ] [Failure ] [ ] [ 80] berbatik_rs.xml (0.0.0) [3046] [Active ] [Failure ] [ ] [ 80] berbatik_image.xml (0.0.0) [3048] [Active ] [ ] [Started] [ 80] berbatik_ldap.xml (0.0.0) <-- Spring-DM
          Hide
          Hendy Irawan added a comment -

          A relatively lightweight approach would be to use AtomicReference<State> and probably additional AtomicReference for other types of state, and generous use of compareAndSet().

          Show
          Hendy Irawan added a comment - A relatively lightweight approach would be to use AtomicReference<State> and probably additional AtomicReference for other types of state, and generous use of compareAndSet().
          Hide
          Hendy Irawan added a comment - - edited

          I thought this happens only (or at least, more often) in direct Blueprint XML deployer.

          But this can also happen in real bundle-based Blueprint, but the bundle is very light (i.e. the bundle only contains the Blueprint XML, no Java classes).

          Show
          Hendy Irawan added a comment - - edited I thought this happens only (or at least, more often) in direct Blueprint XML deployer. But this can also happen in real bundle-based Blueprint, but the bundle is very light (i.e. the bundle only contains the Blueprint XML, no Java classes).
          Hide
          Hendy Irawan added a comment -

          I suspect this is some kind of race condition or timing or concurrent problem, triggered by a "very light" bundle, i.e. bundle that only contains XML, no Java class, and only instantiates objects using classes from other bundles.

          The presence of "service" element is not required to trigger this bug.
          "refresh" is not required to trigger this bug, simple "restart" can trigger this.

          Here's a pretty small Blueprint XML that triggers this bug (90% success when inside bundle, about 50% success when deployed directly):

          <?xml version="1.0" encoding="UTF-8"?>
          <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
              xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0"
              xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
              	http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
              	http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0 http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0">
          
          	<cm:property-placeholder persistent-id="berbatik" update-strategy="reload">
          		<cm:default-properties>
          			<cm:property name="storyMongoUri"			value="mongodb://127.0.0.1:27017/berbatik_dev" />
          		</cm:default-properties>
          	</cm:property-placeholder>
          
              <bean id="personStoryDao" class="id.co.bippo.story.MongoStoryDao"
              	init-method="init" destroy-method="destroy">
              	<argument value="${storyMongoUri}" />
              	<argument value="person" />
              </bean>
          
          <bean id="shopStoryDao" class="id.co.bippo.story.MongoStoryDao"
              	init-method="init" destroy-method="destroy">
              	<argument value="${storyMongoUri}" />
              	<argument value="shop" />
              </bean>
          	
          	<bean id="productStoryDao" class="id.co.bippo.story.MongoStoryDao"
              	init-method="init" destroy-method="destroy">
              	<argument value="${storyMongoUri}" />
              	<argument value="product" />
              </bean>
          
          </blueprint>
          

          Here's another stack trace that can happen:

          2012-11-17 21:05:19,278 | ERROR | rint Extender: 2 | BlueprintContainerImpl           | container.BlueprintContainerImpl  375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_story.xml
          java.lang.NullPointerException
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:635)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:353)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
                  at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
                  at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
          
          Show
          Hendy Irawan added a comment - I suspect this is some kind of race condition or timing or concurrent problem, triggered by a "very light" bundle, i.e. bundle that only contains XML, no Java class, and only instantiates objects using classes from other bundles. The presence of "service" element is not required to trigger this bug. "refresh" is not required to trigger this bug, simple "restart" can trigger this. Here's a pretty small Blueprint XML that triggers this bug (90% success when inside bundle, about 50% success when deployed directly): <?xml version= "1.0" encoding= "UTF-8" ?> <blueprint xmlns= "http: //www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi= "http: //www.w3.org/2001/XMLSchema-instance" xmlns:cm= "http: //aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0" xmlns:ext= "http: //aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0" xsi:schemaLocation="http: //www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http: //aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http: //aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0 http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0"> <cm:property-placeholder persistent-id= "berbatik" update-strategy= "reload" > <cm: default -properties> <cm:property name= "storyMongoUri" value= "mongodb: //127.0.0.1:27017/berbatik_dev" /> </cm: default -properties> </cm:property-placeholder> <bean id= "personStoryDao" class= "id.co.bippo.story.MongoStoryDao" init-method= "init" destroy-method= "destroy" > <argument value= "${storyMongoUri}" /> <argument value= "person" /> </bean> <bean id= "shopStoryDao" class= "id.co.bippo.story.MongoStoryDao" init-method= "init" destroy-method= "destroy" > <argument value= "${storyMongoUri}" /> <argument value= "shop" /> </bean> <bean id= "productStoryDao" class= "id.co.bippo.story.MongoStoryDao" init-method= "init" destroy-method= "destroy" > <argument value= "${storyMongoUri}" /> <argument value= "product" /> </bean> </blueprint> Here's another stack trace that can happen: 2012-11-17 21:05:19,278 | ERROR | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_story.xml java.lang.NullPointerException at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:635)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:353)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07] at java.lang. Thread .run( Thread .java:722)[:1.7.0_07]
          Hide
          Hendy Irawan added a comment -

          I've narrowed it, even this simple one-bean Blueprint can trigger the bug (inside bundle, would be easier to trigger when deployed directly):

          <?xml version="1.0" encoding="UTF-8"?>
          <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
              xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0"
              xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
              	http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
              	http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0 http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0">
          
          	<cm:property-placeholder persistent-id="berbatik" update-strategy="reload">
          		<cm:default-properties>
          			<cm:property name="storyMongoUri"			value="mongodb://127.0.0.1:27017/berbatik_dev" />
          		</cm:default-properties>
          	</cm:property-placeholder>
          
              <bean id="personStoryDao" class="id.co.bippo.story.MongoStoryDao"
              	init-method="init" destroy-method="destroy">
              	<argument value="${storyMongoUri}" />
              	<argument value="person" />
              </bean>
          
          </blueprint>
          

          Another stack trace:

          2012-11-17 21:08:17,791 | ERROR | rint Extender: 3 | BlueprintContainerImpl           | container.BlueprintContainerImpl  375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_story.xml
          java.util.ConcurrentModificationException
                  at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:394)[:1.7.0_07]
                  at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:405)[:1.7.0_07]
                  at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1067)[:1.7.0_07]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:633)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:353)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
                  at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
                  at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
          
          Show
          Hendy Irawan added a comment - I've narrowed it, even this simple one-bean Blueprint can trigger the bug (inside bundle, would be easier to trigger when deployed directly): <?xml version= "1.0" encoding= "UTF-8" ?> <blueprint xmlns= "http: //www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi= "http: //www.w3.org/2001/XMLSchema-instance" xmlns:cm= "http: //aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0" xmlns:ext= "http: //aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0" xsi:schemaLocation="http: //www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http: //aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http: //aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0 http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.1.0"> <cm:property-placeholder persistent-id= "berbatik" update-strategy= "reload" > <cm: default -properties> <cm:property name= "storyMongoUri" value= "mongodb: //127.0.0.1:27017/berbatik_dev" /> </cm: default -properties> </cm:property-placeholder> <bean id= "personStoryDao" class= "id.co.bippo.story.MongoStoryDao" init-method= "init" destroy-method= "destroy" > <argument value= "${storyMongoUri}" /> <argument value= "person" /> </bean> </blueprint> Another stack trace: 2012-11-17 21:08:17,791 | ERROR | rint Extender: 3 | BlueprintContainerImpl | container.BlueprintContainerImpl 375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_story.xml java.util.ConcurrentModificationException at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:394)[:1.7.0_07] at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:405)[:1.7.0_07] at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1067)[:1.7.0_07] at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:633)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:353)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07] at java.lang. Thread .run( Thread .java:722)[:1.7.0_07]
          Hide
          Hendy Irawan added a comment -

          I think CM is either a cause or compounds the problem. Leaving out cm:property-placeholder, I have a hard time reproducing this after 50 retries, i.e. the following Blueprint is very stable:

          <?xml version="1.0" encoding="UTF-8"?>
          <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
          
              <bean id="personStoryDao" class="id.co.bippo.story.MongoStoryDao"
              	init-method="init" destroy-method="destroy">
              	<argument value="mongodb://127.0.0.1:27017/berbatik_dev" />
              	<argument value="person" />
              </bean>
          
          </blueprint>
          
          Show
          Hendy Irawan added a comment - I think CM is either a cause or compounds the problem. Leaving out cm:property-placeholder, I have a hard time reproducing this after 50 retries, i.e. the following Blueprint is very stable: <?xml version= "1.0" encoding= "UTF-8" ?> <blueprint xmlns= "http: //www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi= "http: //www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http: //www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd" > <bean id= "personStoryDao" class= "id.co.bippo.story.MongoStoryDao" init-method= "init" destroy-method= "destroy" > <argument value= "mongodb: //127.0.0.1:27017/berbatik_dev" /> <argument value= "person" /> </bean> </blueprint>
          Hide
          Hendy Irawan added a comment -

          cm:property-placeholder is the cause, or at least one of the causes. This happens about 5-10% probability :

          2012-11-17 21:13:22,640 | ERROR | rint Extender: 2 | BlueprintContainerImpl           | container.BlueprintContainerImpl  375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_story.xml
          org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean .cm-39
                  at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:714)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[7:org.apache.aries.blueprint.core:1.0.1]
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
                  at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
                  at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:247)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:646)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:353)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
                  at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
                  at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
          Caused by: org.osgi.service.blueprint.container.ServiceUnavailableException: The Blueprint container is being or has been destroyed: (objectClass=org.osgi.service.cm.ConfigurationAdmin)
                  at org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:234)
                  at org.apache.aries.blueprint.container.ReferenceRecipe.access$0(ReferenceRecipe.java:198)
                  at org.apache.aries.blueprint.container.ReferenceRecipe$ServiceDispatcher.call(ReferenceRecipe.java:292)
                  at Proxy67489cca_cecf_48d0_a226_f57b9e40173f.listConfigurations(Unknown Source)
                  at org.apache.aries.blueprint.compendium.cm.CmUtils.getConfiguration(CmUtils.java:37)
                  at org.apache.aries.blueprint.compendium.cm.CmPropertyPlaceholder.init(CmPropertyPlaceholder.java:92)
                  at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_07]
                  at java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_07]
                  at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[7:org.apache.aries.blueprint.core:1.0.1]
                  ... 20 more
          

          with this Blueprint:

          <?xml version="1.0" encoding="UTF-8"?>
          <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
              xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
          
          	<cm:property-placeholder persistent-id="berbatik" update-strategy="reload">
          	</cm:property-placeholder>
          
              <bean id="personStoryDao" class="id.co.bippo.story.MongoStoryDao"
              	init-method="init" destroy-method="destroy">
              	<argument value="mongodb://127.0.0.1:27017/berbatik_dev" />
              	<argument value="person" />
              </bean>
          
          </blueprint>
          

          Note that the property isn't even used at all in the Blueprint, but it's enough to trigger the bug.

          BTW, adding "xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"" is not enough to trigger the bug, need to add "cm:property-placeholder" element for the bug to come up.

          Note that my 'berbatik.cfg' file is put in deploy folder, and it's a symlink.

          Also, changing 'update-strategy="reload"' to 'update-strategy="none"' made the bug go away.

          If I delete 'berbatik.cfg' file from deploy, even with update-strategy="reload", I can't reproduce the bug.

          If I put 'berbatik.cfg' file to deploy as a real not (not a symlink), even with update-strategy="reload", I can't reproduce the bug.

          So it seems a problem with cm:property-placeholder and symlinked .cfg in deploy.

          Show
          Hendy Irawan added a comment - cm:property-placeholder is the cause, or at least one of the causes. This happens about 5-10% probability : 2012-11-17 21:13:22,640 | ERROR | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_story.xml org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean .cm-39 at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:714)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[7:org.apache.aries.blueprint.core:1.0.1] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:247)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:646)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:353)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07] at java.lang. Thread .run( Thread .java:722)[:1.7.0_07] Caused by: org.osgi.service.blueprint.container.ServiceUnavailableException: The Blueprint container is being or has been destroyed: (objectClass=org.osgi.service.cm.ConfigurationAdmin) at org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:234) at org.apache.aries.blueprint.container.ReferenceRecipe.access$0(ReferenceRecipe.java:198) at org.apache.aries.blueprint.container.ReferenceRecipe$ServiceDispatcher.call(ReferenceRecipe.java:292) at Proxy67489cca_cecf_48d0_a226_f57b9e40173f.listConfigurations(Unknown Source) at org.apache.aries.blueprint.compendium.cm.CmUtils.getConfiguration(CmUtils.java:37) at org.apache.aries.blueprint.compendium.cm.CmPropertyPlaceholder.init(CmPropertyPlaceholder.java:92) at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_07] at java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_07] at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[7:org.apache.aries.blueprint.core:1.0.1] ... 20 more with this Blueprint: <?xml version= "1.0" encoding= "UTF-8" ?> <blueprint xmlns= "http: //www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi= "http: //www.w3.org/2001/XMLSchema-instance" xmlns:cm= "http: //aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0" xsi:schemaLocation= "http: //www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd" > <cm:property-placeholder persistent-id= "berbatik" update-strategy= "reload" > </cm:property-placeholder> <bean id= "personStoryDao" class= "id.co.bippo.story.MongoStoryDao" init-method= "init" destroy-method= "destroy" > <argument value= "mongodb: //127.0.0.1:27017/berbatik_dev" /> <argument value= "person" /> </bean> </blueprint> Note that the property isn't even used at all in the Blueprint, but it's enough to trigger the bug. BTW, adding "xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"" is not enough to trigger the bug, need to add "cm:property-placeholder" element for the bug to come up. Note that my 'berbatik.cfg' file is put in deploy folder, and it's a symlink. Also, changing 'update-strategy="reload"' to 'update-strategy="none"' made the bug go away. If I delete 'berbatik.cfg' file from deploy, even with update-strategy="reload", I can't reproduce the bug. If I put 'berbatik.cfg' file to deploy as a real not (not a symlink), even with update-strategy="reload", I can't reproduce the bug. So it seems a problem with cm:property-placeholder and symlinked .cfg in deploy.
          Hide
          Hendy Irawan added a comment -

          OK, I just got it, even with a real berbatik.cfg file in deploy folder, but it happened on a Spring XML deployer. Which I'm not sure if it's this problem or another problem...

          My hypothesis is:

          1. Using a real .cfg file, as opposed to symlinked .cfg file, in deploy folder, will greatly reduce the probability of this bug. (perhaps 0.1-1% occurence)
          2. Using update-strategy="none" greatly reduces the probability of this bug, and perhaps even up to point of negligible.

          Show
          Hendy Irawan added a comment - OK, I just got it, even with a real berbatik.cfg file in deploy folder, but it happened on a Spring XML deployer. Which I'm not sure if it's this problem or another problem... My hypothesis is: 1. Using a real .cfg file, as opposed to symlinked .cfg file, in deploy folder, will greatly reduce the probability of this bug. (perhaps 0.1-1% occurence) 2. Using update-strategy="none" greatly reduces the probability of this bug, and perhaps even up to point of negligible.
          Hide
          Hendy Irawan added a comment -

          There's no problem with the direct Blueprint XML deployer vs XML-in-a-bundle deployer.

          Using:
          1. real .cfg file
          2. update-strategy="reload"
          3. direct Blueprint XML deployer

          it's really stable... The major difference is between real .cfg vs symlinked !

          Show
          Hendy Irawan added a comment - There's no problem with the direct Blueprint XML deployer vs XML-in-a-bundle deployer. Using: 1. real .cfg file 2. update-strategy="reload" 3. direct Blueprint XML deployer it's really stable... The major difference is between real .cfg vs symlinked !
          Hide
          Hendy Irawan added a comment -

          ......not always sigh

          2012-11-17 21:32:29,351 | ERROR | rint Extender: 2 | BlueprintContainerImpl           | container.BlueprintContainerImpl  375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_like.xml
          java.lang.NullPointerException
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.getMissingDependencies(BlueprintContainerImpl.java:695)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:342)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
                  at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
                  at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
          

          and

          2012-11-17 21:32:59,648 | ERROR | rint Extender: 1 | BlueprintContainerImpl           | container.BlueprintContainerImpl  375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_like.xml
          java.lang.NullPointerException
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:520)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:338)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1]
                  at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1]
                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07]
                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07]
                  at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07]
                  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07]
                  at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
          
          Show
          Hendy Irawan added a comment - ......not always sigh 2012-11-17 21:32:29,351 | ERROR | rint Extender: 2 | BlueprintContainerImpl | container.BlueprintContainerImpl 375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_like.xml java.lang.NullPointerException at org.apache.aries.blueprint.container.BlueprintContainerImpl.getMissingDependencies(BlueprintContainerImpl.java:695)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:342)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07] at java.lang. Thread .run( Thread .java:722)[:1.7.0_07] and 2012-11-17 21:32:59,648 | ERROR | rint Extender: 1 | BlueprintContainerImpl | container.BlueprintContainerImpl 375 | 7 - org.apache.aries.blueprint.core - 1.0.1 | Unable to start blueprint container for bundle berbatik_like.xml java.lang.NullPointerException at org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:520)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:338)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:252)[7:org.apache.aries.blueprint.core:1.0.1] at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.0.1] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_07] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_07] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_07] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_07] at java.lang. Thread .run( Thread .java:722)[:1.7.0_07]
          Hide
          Hendy Irawan added a comment -

          But setting update-strategy="none" really makes the bug practically vanishes.

          Show
          Hendy Irawan added a comment - But setting update-strategy="none" really makes the bug practically vanishes.
          Hide
          Hendy Irawan added a comment -

          But I still think the problem lies with `BlueprintContainerImpl`, Aries CM/Spring-DM calling `reload()` just triggers the problem.

          Show
          Hendy Irawan added a comment - But I still think the problem lies with `BlueprintContainerImpl`, Aries CM/Spring-DM calling `reload()` just triggers the problem.
          Hide
          WilliamMcDonald added a comment -

          We're writing camel routes using the reload strategy and getting similar errors.
          <cm:property-placeholder persistent-id="myConf" placeholder-prefix="" placeholder-suffix="" update-strategy="reload">

          In our case, the camel route is started and shutdown again and again. If we remove the update-strategy (I guess it defaults to 'none') then everything works fine.

          This is really sad - part of the cool thing about the property place holder and karaf is the ability to change properties live. Is there a work around that still uses blueprint xml? Or any other work around?

          jboss-fuse-6.0.0.redhat-024
          karaf 2.3.0.redhat-60024,
          java 1.6.0_65,
          SunOS version 5.10 spark 128
          ID State Blueprint Spring Level Name
          [ 9] [Active ] [ ] [ ] [ 20] Apache Aries Blueprint API (1.0.1.redhat-60024)
          [ 11] [Active ] [Created ] [ ] [ 20] Apache Aries Blueprint CM (1.0.1.redhat-60024)
          [ 14] [Active ] [Created ] [ ] [ 20] Apache Aries Blueprint Core (1.0.1.redhat-60024)
          [ 18] [Active ] [Created ] [ ] [ 28] Apache Karaf :: Deployer :: Blueprint (2.3.0.redhat-60024)
          [ 42] [Active ] [ ] [ ] [ 30] Apache Aries JMX Blueprint Core (1.0.1.redhat-60024)
          [ 43] [Active ] [ ] [ ] [ 30] Apache Aries JMX Blueprint API (1.0.1.redhat-60024)
          [ 138] [Active ] [Created ] [ ] [ 50] camel-blueprint (2.10.0.redhat-60024)

          Show
          WilliamMcDonald added a comment - We're writing camel routes using the reload strategy and getting similar errors. <cm:property-placeholder persistent-id="myConf" placeholder-prefix=" " placeholder-suffix=" " update-strategy="reload"> In our case, the camel route is started and shutdown again and again. If we remove the update-strategy (I guess it defaults to 'none') then everything works fine. This is really sad - part of the cool thing about the property place holder and karaf is the ability to change properties live. Is there a work around that still uses blueprint xml? Or any other work around? jboss-fuse-6.0.0.redhat-024 karaf 2.3.0.redhat-60024, java 1.6.0_65, SunOS version 5.10 spark 128 ID State Blueprint Spring Level Name [ 9] [Active ] [ ] [ ] [ 20] Apache Aries Blueprint API (1.0.1.redhat-60024) [ 11] [Active ] [Created ] [ ] [ 20] Apache Aries Blueprint CM (1.0.1.redhat-60024) [ 14] [Active ] [Created ] [ ] [ 20] Apache Aries Blueprint Core (1.0.1.redhat-60024) [ 18] [Active ] [Created ] [ ] [ 28] Apache Karaf :: Deployer :: Blueprint (2.3.0.redhat-60024) [ 42] [Active ] [ ] [ ] [ 30] Apache Aries JMX Blueprint Core (1.0.1.redhat-60024) [ 43] [Active ] [ ] [ ] [ 30] Apache Aries JMX Blueprint API (1.0.1.redhat-60024) [ 138] [Active ] [Created ] [ ] [ 50] camel-blueprint (2.10.0.redhat-60024)
          Hide
          Jean-Marc Reymond added a comment -

          This issue is hitting us hard
          If Blueprint is to be the new standard and Spring DM should not be used anymore, this has to be fixed.
          The possibility to be able to change properties live is an important one and should not be neglected.
          Any work around for this?

          jboss-fuse-6.1.0.redhat-328
          karaf 2.3.0.redhat-610328,
          java 1.7.0_51,
          Ubuntu 13.10 64bit

          Show
          Jean-Marc Reymond added a comment - This issue is hitting us hard If Blueprint is to be the new standard and Spring DM should not be used anymore, this has to be fixed. The possibility to be able to change properties live is an important one and should not be neglected. Any work around for this? jboss-fuse-6.1.0.redhat-328 karaf 2.3.0.redhat-610328, java 1.7.0_51, Ubuntu 13.10 64bit
          Hide
          Torsten Mielke added a comment - - edited

          I believe to have hit the same problem. Although the error message is slightly different with

          Caused by: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'blueprintBundle' could be found
          

          Will attach a JUnit test in UnitTest.tgz that reproduces the problem. Not on every run but if you run it multiple times using the included script "runUnitTestTillFail", it will not take long to reproduce the problem.

          This unit test uses CamelBlueprintTestSupport to start a Camel context and a couple of beans.
          Hope this will be useful.

          Show
          Torsten Mielke added a comment - - edited I believe to have hit the same problem. Although the error message is slightly different with Caused by: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'blueprintBundle' could be found Will attach a JUnit test in UnitTest.tgz that reproduces the problem. Not on every run but if you run it multiple times using the included script "runUnitTestTillFail", it will not take long to reproduce the problem. This unit test uses CamelBlueprintTestSupport to start a Camel context and a couple of beans. Hope this will be useful.
          Hide
          Claus Ibsen added a comment -

          Is there any remote chance that anyone from the Apache Aries team would ever take a look at this?

          Its getting harder to justify the osgi road when things are not improved and fixed for people, and there is radio silence in this community from the Aries team.

          Show
          Claus Ibsen added a comment - Is there any remote chance that anyone from the Apache Aries team would ever take a look at this? Its getting harder to justify the osgi road when things are not improved and fixed for people, and there is radio silence in this community from the Aries team.

            People

            • Assignee:
              Unassigned
              Reporter:
              Hendy Irawan
            • Votes:
              8 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:

                Development