Hi, Just thought to post an update on this.
It does look like a Felix specific issue. Tested with both Declarative Service bundle versions - 1.0.6 and 1.0.8. Both report the bundles to be in the 'unsatisfied' state. I then tried this on equinox and it seems to work as expected. I'll give it a shot with the scr v1.2.0 when it's out. Thanks for your help. Mohnish mohn3310 wrote: > > Hi Felix, > > Thanks for your response. > > We're on version 1.0.8 of the "Apache Felix Declarative Services" bundle. > I reverted to version 1.0.6 and am still running into the same issue. > > The strange thing is we have two bundles with pretty much the extact > structure (using DS) and one of them works whereas this one doesn't. I've > put log statements to std out in the bind/unbind methods and I never see > it executed in this one, but in the other one I do. And this is consistent > behaviour. > > Any other ideas as to why it might be behaving this way? I've doubled > checked to see if I've missed anything, but nothing obvious is showing up. > > Thanks, > Mohnish > > > Felix Meschberger-2 wrote: >> >> Hi, >> >> Are you using the latest release of Apache Felix Declarative Services ? >> In this case, you might be hit by FELIX-1178 [1] >> >> Your options are reverting to the previous release or upgrading to a >> trunk build. >> >> We are close to a new release of SCR (we have a small number of issues >> open). >> >> Regards >> Felix >> >> [1] https://issues.apache.org/jira/browse/FELIX-1178 >> >> mohn3310 schrieb: >>> Hello, >>> >>> I've recently converted from using Activators to Declarative Services. >>> I've >>> run into an issue where all dependent services are satisfied, but the >>> overall state of the component is still unsatisfied. Any idea how it >>> could >>> get into this state? >>> >>> Here's the output of 'scr info': >>> >>> -> scr info 9 >>> ID: 9 >>> Name: MyBundle >>> Bundle: com.myco.MyBundle (41) >>> State: unsatisifed >>> Default State: enabled >>> Activation: immediate >>> Services: com.myco.MyBundleService >>> Service Type: service >>> Reference: logService >>> Satisfied: satisfied >>> Service Name: org.osgi.service.log.LogService >>> Multiple: single >>> Optional: mandatory >>> Policy: static >>> Reference: persistenceService >>> Satisfied: satisfied >>> Service Name: com.myco.persistence.PersistenceService >>> Multiple: single >>> Optional: mandatory >>> Policy: static >>> Reference: httpService >>> Satisfied: satisfied >>> Service Name: org.osgi.service.http.HttpService >>> Multiple: single >>> Optional: mandatory >>> Policy: static >>> Properties: >>> component.id = 9 >>> component.name = MyBundle >>> service.pid = MyBundle >>> >>> And here's the scr-plugin generated serviceComponents.xml file: >>> >>> <?xml version="1.0" encoding="UTF-8"?> >>> <components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0"> >>> <scr:component enabled="true" immediate="true" name="MyBundle"> >>> <implementation class="com.myco.impl.MyBundleServiceImpl"/> >>> <service servicefactory="false"> >>> <provide interface="com.myco.MyBundleService"/> >>> </service> >>> <property name="service.pid" value="MyBundle"/> >>> <reference name="logService" >>> interface="org.osgi.service.log.LogService" cardinality="1..1" >>> policy="static" bind="bindLogService" unbind="unbindLogService"/> >>> <reference name="persistenceService" >>> interface="com.myco.persistence.PersistenceService" cardinality="1..1" >>> policy="static" bind="bindPersistenceService" >>> unbind="unbindPersistenceService"/> >>> <reference name="httpService" >>> interface="org.osgi.service.http.HttpService" cardinality="1..1" >>> policy="static" bind="bindHttpService" unbind="unbindHttpService"/> >>> </scr:component> >>> </components> >>> >>> Thanks for your help. >>> >>> Mohnish >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> >> > > -- View this message in context: http://www.nabble.com/Bundle-unsatisfied-when-using-Declarative-Services-tp25829887p25880197.html Sent from the Apache Felix - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

