You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Simon Chemouil (JIRA)" <ji...@apache.org> on 2015/04/17 15:09:01 UTC

[jira] [Issue Comment Deleted] (FELIX-4851) ConfigAdmin only forwards ConfigurationEvents to ConfigurationListeners which are provided by bundles that are in state ACTIVE

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

Simon Chemouil updated FELIX-4851:
----------------------------------
    Comment: was deleted

(was: 
I'm on Linux with Apache Maven 3.3.1, a clean local repository and Maven central.

I have tens of errors like this:
{noformat}
ERROR: Bundle org.ops4j.pax.tinybundles [15] Error starting mvn:org.ops4j.pax.tinybundles/tinybundles/1.0.0 (org.osgi.framework.BundleException: Unresolved constraint in bundle org.ops4j.pax.tinybun
dles [15]: Unable to resolve 15.0: missing requirement [15.0] osgi.wiring.package; (&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0))) [caused by: Unable to resolve 6.0: missing re
quirement [6.0] osgi.wiring.package; (osgi.wiring.package=javax.xml.parsers)])
org.osgi.framework.BundleException: Unresolved constraint in bundle org.ops4j.pax.tinybundles [15]: Unable to resolve 15.0: missing requirement [15.0] osgi.wiring.package; (&(osgi.wiring.package=org
.slf4j)(version>=1.6.0)(!(version>=2.0.0))) [caused by: Unable to resolve 6.0: missing requirement [6.0] osgi.wiring.package; (osgi.wiring.package=javax.xml.parsers)]
{noformat}

Most errors are related to javax packages not being defined in systemPackages() in pax exam.

)

> ConfigAdmin only forwards ConfigurationEvents to ConfigurationListeners which are provided by bundles that are in state ACTIVE
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-4851
>                 URL: https://issues.apache.org/jira/browse/FELIX-4851
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>    Affects Versions: configadmin-1.8.2
>            Reporter: Jens Offenbach
>            Assignee: David Bosschaert
>            Priority: Critical
>             Fix For: configadmin-1.8.4
>
>
> I am facing a serious problem with the Felix ConfigAdmin in combination with Felix SCR. Let us assume that the SCR bundle becomes activated at last and activates a component that creates a configuration which itself is a precondition for the instantiation of another component (ConfigurationPolicy#REQUIRE). In this case the Felix ConfigAdmin does not deliver the configuration update event to SCR, although SCR has registered a ConfigurationListener in the OSGi Service Registry.
> The problem is caused by line 2029 of the class ConfigurationManager (Version: 1.8.3-SNAPSHOT):
> {code}
> if ( listenerProvider[serviceIndex].getState() == Bundle.ACTIVE && this.listeners[serviceIndex] != null )
> {code}
> In this scenario, the SCR bundle is in state STARTING and reaches the ACTIVE state directly after all available components have been activated. Because of missing Configuration Events caused by the Felix ConfigAdmin, SCR is not able to activate all those components whose preconditions are actually fulfilled. The problem does not occur in combination with the Equinox ConfigAdmin, which does not make the problematic bundle state check.
> I highly recommend removing the bundle state check and change line 2029 into:
> {code}
> if ( this.listeners[serviceIndex] != null ).
> {code}
> It is up to the developer to decide, in which bundle state configuration events are considered to be important or not. In the SCR scenario, the developers rely on the fact that configuration events are delivered independently of their bundle state.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)