Hi, Just FYI, more like a aries side issue, take a look at similar bug tracked at aries side[1]. [1]https://issues.apache.org/jira/browse/ARIES-961 ------------- Freeman(Yue) Fang
Red Hat, Inc. FuseSource is now part of Red Hat Web: http://fusesource.com | http://www.redhat.com/ Twitter: freemanfang Blog: http://freemanfang.blogspot.com http://blog.sina.com.cn/u/1473905042 weibo: @Freeman小屋 On 2013-1-21, at 下午3:04, XiLai Dai wrote: > Hi, > > Given a blueprint xml likes this: > > <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" > > xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"> > > <cm:property-placeholder persistent-id="abc" update-strategy="reload"> > <cm:default-properties> > <cm:property name="key1" value="value1" /> > <cm:property name="key2" value="value2" /> > </cm:default-properties> > </cm:property-placeholder> > > <bean id="myBean" class="org.abc.Abc"> > <property name="mykey1" value=”key1"/> > <property name="mykey1" value=”key1"/> > </bean> > > <service interface="org.abc.interface" ref="myBean"/> > > </blueprint> > > Which uses cm:property-placeholder to read properties from etc/abc.cfg and > expose an osgi service. > The problem here is: in case there is no abc.cfg existing in the etc/ > folder, and set update-strategy="reload" , (be default, > update-strategy="none" which works ok but can’t auto reload the value of > properties ) then, the NoSuchComponentException will be thrown. > > Caused by: org.osgi.service.blueprint.container.NoSuchComponentException: No > component with id 'registryServerBean' could be found > at > org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:55)[9:org.apache.aries.blueprint:0.3.2] > at > org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)[9:org.apache.aries.blueprint:0.3.2] > at > org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)[9:org.apache.aries.blueprint:0.3.2] > at > org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:198)[9:org.apache.aries.blueprint:0.3.2] > at > org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:137)[9:org.apache.aries.blueprint:0.3.2] > at > org.apache.aries.blueprint.container.ServiceRecipe.createRecipe(ServiceRecipe.java:370)[9:org.apache.aries.blueprint:0.3.2] > at > org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:278)[9:org.apache.aries.blueprint:0.3.2] > at > org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:248)[9:org.apache.aries.blueprint:0.3.2] > at > org.apache.aries.blueprint.container.ServiceRecipe.internalCreate(ServiceRecipe.java:140)[9:org.apache.aries.blueprint:0.3.2] > at > org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)[9:org.apache.aries.blueprint:0.3.2] > at > org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)[9:org.apache.aries.blueprint:0.3.2] > at > org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)[9:org.apache.aries.blueprint:0.3.2] > at > org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:631)[9:org.apache.aries.blueprint:0.3.2] > ... 10 more > > (The Karaf verison is 2.2.9, Aries version is 0.3.2) > > Any suggestions? Thanks. > > BR > Xilai