The package org.osgi.service.component.annotations is not meant to be imported by bundles. There is no need for a bundle to be wired to these packages at runtime. The JARs the OSGi specification (working group) provides in maven central are only meant to be used for compile time dependencies. As such these JARs have a non-resolvable requirement in them (osgi.compile.time.only) so that they cannot be used at runtime. You should not install that "bundle" into your framework instance.
I'm not sure I understand your second point. Is that a question? It seems to state the expected behavior as defined in the current Declarative Services specification. Tom ________________________________ From: equinox-dev <[email protected]> on behalf of Kanika Khattar <[email protected]> Sent: Wednesday, February 23, 2022 10:26 PM To: [email protected] <[email protected]> Subject: [EXTERNAL] [equinox-dev] Issue with OSGI Annotations Hi All, While using OSGI Annotations in my project, I am getting a few issues. It will be great if you can help me with the same. Below are the issues: 1. !ENTRY org.osgi.service.metatype.annotations 4 0 2022-02-24 09:43:01.813 !MESSAGE FrameworkEvent ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization. ZjQcmQRYFpfptBannerEnd Hi All, While using OSGI Annotations in my project, I am getting a few issues. It will be great if you can help me with the same. Below are the issues: 1. !ENTRY org.osgi.service.metatype.annotations 4 0 2022-02-24 09:43:01.813 !MESSAGE FrameworkEvent ERROR !STACK 0 org.osgi.framework.BundleException: Could not resolve module: org.osgi.service.metatype.annotations [219] Unresolved requirement: Require-Capability: osgi.compile.time.only; filter:="(&(must.not.resolve=*)(!(must.not.resolve=*)))" at org.eclipse.osgi.container.Module.start(Module.java:463) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1845) at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1838) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1781) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1743) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1665) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) !ENTRY org.osgi.service.component.annotations 4 0 2022-02-24 09:43:01.887 !MESSAGE FrameworkEvent ERROR !STACK 0 org.osgi.framework.BundleException: Could not resolve module: org.osgi.service.component.annotations [239] Unresolved requirement: Require-Capability: osgi.compile.time.only; filter:="(&(must.not.resolve=*)(!(must.not.resolve=*)))" at org.eclipse.osgi.container.Module.start(Module.java:463) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1845) at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1838) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1781) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1743) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1665) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) 2. Activate method gets called when Configuration Policy is set to OPTIONAL. When Configuration Policy is REQUIRE, the activate method is not called. Thanks & Regards, Kanika
_______________________________________________ equinox-dev mailing list [email protected] To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/equinox-dev
