felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Meschberger (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (FELIX-2578) Declarative Services bundle does not start without Configuration Admin API wired
Date Fri, 04 Feb 2011 10:56:28 GMT

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

Felix Meschberger resolved FELIX-2578.
--------------------------------------

    Resolution: Fixed

Refactored Configuration Admin Support in Rev. 1067145:

The ConfigurationAdmin (and Metatype) APIs are dynamically bound on demand

The bundle's own configuration is now retrieved using a ManagedService registered as using
the ServiceFactory pattern.

The component configuration is refactored in that there is a support class interface between
the component registry and Configuration Admin. The support class is only instantiated once
the Configuration Admin service is available. Once the service is unregistered the support
class is removed again. This support class not only provides initial component configuration
but also configuration updates by registering a ConfigurationListener.

I have tested it in a Sling environment and so far all looks good.

> Declarative Services bundle does not start without Configuration Admin API wired
> --------------------------------------------------------------------------------
>
>                 Key: FELIX-2578
>                 URL: https://issues.apache.org/jira/browse/FELIX-2578
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions:  scr-1.6.0
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: scr-1.6.2
>
>         Attachments: patch
>
>
> The Declarative Services bundle imports the Configuration Admin package (org.osgi.service.cm)
optionally with the intent to be able to operate without the Configuration Admin Service and
its API present.
> In reality, the bundle does not start without the API being wired with the following
exception:
> org.osgi.framework.BundleException: Activator start error in bundle org.apache.felix.scr
[5].
> 	at org.apache.felix.framework.Felix.activateBundle(Felix.java:1864)
> 	at org.apache.felix.framework.Felix.startBundle(Felix.java:1734)
> 	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
> 	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892)
> 	[...]
> Caused by: java.lang.NoClassDefFoundError: org/osgi/service/cm/ConfigurationListener
> 	at java.lang.ClassLoader.defineClass1(Native Method)
> 	at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
> 	at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1829)
> 	at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:716)
> 	at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73)
> 	at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> 	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
> 	at java.lang.Class.getDeclaredConstructors0(Native Method)
> 	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
> 	at java.lang.Class.getConstructor0(Class.java:2699)
> 	at java.lang.Class.newInstance0(Class.java:326)
> 	at java.lang.Class.newInstance(Class.java:308)
> 	at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:3659)
> 	at org.apache.felix.framework.Felix.activateBundle(Felix.java:1812)
> 	... 31 more
> Caused by: java.lang.ClassNotFoundException: org.osgi.service.cm.ConfigurationListener
> 	at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:772)
> 	at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73)
> 	at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> 	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
> 	... 46 more

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message