You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2010/09/04 21:06:32 UTC
[jira] Created: (FELIX-2578) Declarative Services bundle does not
start without Configuration Admin API wired
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
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.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (FELIX-2578) Declarative Services bundle does not
start without Configuration Admin API wired
Posted by "Alex Blewitt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Blewitt updated FELIX-2578:
--------------------------------
Attachment: patch
Until the code is fixed, the import should be changed from optional to non-optional, so that people know it will work if it resolves.
> 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.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-2578) Declarative Services bundle does not
start without Configuration Admin API wired
Posted by "Alex Blewitt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930117#action_12930117 ]
Alex Blewitt commented on FELIX-2578:
-------------------------------------
NB this same problem appears for 1.4.0 as well.
> 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.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-2578) Declarative Services bundle does not
start without Configuration Admin API wired
Posted by "Alex Blewitt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930115#action_12930115 ]
Alex Blewitt commented on FELIX-2578:
-------------------------------------
I found this as well. The problem is that the Felix-SCR has Import-Package: org.osgi.service.cm;resolution:=optional, but since the Activator implements the ConfigurationListener interface, the Activator can't be resolved (and so the bundle can't be started)
> 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
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.