felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FELIX-5197) non-fatal circularities in SCR should be info, not error, in log
Date Thu, 16 Mar 2017 20:32:41 GMT

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

Carsten Ziegeler resolved FELIX-5197.
-------------------------------------
    Resolution: Won't Fix

Does not look like an SCR bug

> 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)

Mime
View raw message