Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Issue with OSGI Annotations
  • From: Thomas Watson <tjwatson@xxxxxxxxxx>
  • Date: Thu, 24 Feb 2022 14:16:54 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=us.ibm.com; dmarc=pass action=none header.from=us.ibm.com; dkim=pass header.d=us.ibm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0qWf7NrJNaIhN9FgL619ReNwZGLwo0bdqQZ2faDSzwg=; b=LF8nS6/kQWUYTe6E7sn53XtQ4llhDh85ZE5QFL7YUGZ/3ZpI55fmK4WiYoauDwkmKPUvrx6ZMRlQ/acFtEjQ7tIFydKgKFlIUx5MGKGftqZj3fUEPjlapnQYaj1RQ+zdep4zMYJEqCLCkbDY9Gpso6vp2dp80zn1aHd/UsrEUuXZrb6dDqD7RCu4pwaPz8W0h6wQrdLLdQDm0UqKPfHe3xPqB3odvj+lvhHmgFjxRc1EXKGaegJSmiU4pRP7p7obL1IH7m4hc08lEqBMYmXLRgPjwYTCMtJ8QfBrtERs6F8iTkz5009oCAKY1Hblm2YvDK1lTbVQ1lIkdwQP6vFBIw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EUYzn04hi+vf3d7omeBpmEB93MgWsAo6FW2eEFXqw9iY0wnYMmdKr+mkk0XWig8bJT2gkLt+HBEUGdLB3apBmeH5ciIbsBXG9tSfBkTRWDYdbeU8QXt+rH3Rs6VSg1rkgSAjUKwFe9xyvBt69n3FZ+/8TinX+PkRK4c6DL8ovbctHiO/o6/GfYJfbLZsHlHXBT/pLr4Dq+CZMwFuAdkjd1ZdkeVZhxbkDNGU3C/8xRQrhj1l6bq7wEM+v8SzQwKb9RFoqtUnDLKKjthXZH1FpDxxI5wCxTQXQ9Bw9sCqfdTWrq/FJu9YAFPUm4lpqjq/4xZCkkRDb2MbDPp4bGdrPg==
  • Delivered-to: equinox-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/equinox-dev/>
  • List-help: <mailto:equinox-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/equinox-dev>, <mailto:equinox-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/equinox-dev>, <mailto:equinox-dev-request@eclipse.org?subject=unsubscribe>
  • Suggested_attachment_session_id: 961782e5-ff42-e7b2-0c37-db7b172378c9
  • Thread-index: AQHYKTaxlf1InS4gC0OdlO8QuHJzDayivlet
  • Thread-topic: [EXTERNAL] [equinox-dev] Issue with OSGI Annotations

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 <equinox-dev-bounces@xxxxxxxxxxx> on behalf of Kanika Khattar <kanikakhattar14@xxxxxxxxx>
Sent: Wednesday, February 23, 2022 10:26 PM
To: equinox-dev@xxxxxxxxxxx <equinox-dev@xxxxxxxxxxx>
Subject: [EXTERNAL] [equinox-dev] Issue with OSGI Annotations
 
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




Back to the top