You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Karl Pauls (JIRA)" <ji...@apache.org> on 2017/02/24 12:49:44 UTC

[jira] [Updated] (FELIX-5197) non-fatal circularities in SCR should be info, not error, in log

     [ https://issues.apache.org/jira/browse/FELIX-5197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl Pauls updated FELIX-5197:
------------------------------
    Component/s:     (was: Framework)
                 Declarative Services (SCR)

> non-fatal circularities in SCR should be info, not error, in log
> ----------------------------------------------------------------
>
>                 Key: FELIX-5197
>                 URL: https://issues.apache.org/jira/browse/FELIX-5197
>             Project: Felix
>          Issue Type: Improvement
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-2.0.2
>            Reporter: Benson Margulies
>
> I have two components that have a pseudo-circular dependency.
> Component 'WorkerInterface' has a reference like:
> {code}
> @Reference(cardinality = ReferenceCardinality.MULTIPLE, policy =
> ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY)
> public void setWorkerComponentService(WorkerComponentService
> workerComponentService) { ... }
> {code}
> one of the components that provides 'WorkerComponentService' has:
> {code}
>     @Reference(cardinality = ReferenceCardinality.OPTIONAL, policy =
> ReferencePolicy.DYNAMIC, unbind = "unbindWorkerInterface")
>     public void setWorkerInterface(WorkerInterface workerInterface) { .. }
> {code}
> This all works: The second activates, the first activates, and then
> the second gets called with the reference to the first. However, along
> the way, an alarming ERROR-level log message is delivered, as below.
> I submit that this should be no louder than INFO.
> {noformat}
> 2016-02-24 10:25:30,963 | ERROR | lixDispatchQueue |
> rosapi-worker-rni-rnt-sdk        | 51 -
> com.basistech.ws.rosapi-worker-rni-rnt-sdk - 0.8.101.v20160224031931 |
> FrameworkEvent ERROR - com.basistech.ws.rosapi-worker-rni-rnt-sdk
> org.osgi.framework.ServiceException: ServiceFactory.getService()
> resulted in a cycle.
>     at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:301)[org.apache.felix.framework-5.4.0.jar:]
>     at org.apache.felix.framework.Felix.getService(Felix.java:3699)[org.apache.felix.framework-5.4.0.jar:]
>     at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)[org.apache.felix.framework-5.4.0.jar:]
>     at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:72)[129:org.apache.felix.scr:2.0.2]
>     at org.apache.felix.scr.impl.helper.BindMethod.getServiceObject(BindMethod.java:646)[129:org.apache.felix.scr:2.0.2]
>     at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2137)[129:org.apache.felix.scr:2.0.2]
>     at org.apache.felix.scr.impl.manager.DependencyManager$SingleDynamicCustomizer.prebind(DependencyManager.java:872)[129:org.apache.felix.scr:2.0.2]
>     at org.apache.felix.scr.impl.manager.DependencyManager.prebind(DependencyManager.java:1457)[129:org.apache.felix.scr:2.0.2]
>     at org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(AbstractComponentManager.java:983)[129:org.apache.felix.scr:2.0.2]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)