Hi,

Thanks! I'll try with the 6.0.2 version of the framework and 2.1.16 of SCR 
then. Have there been changes made in these versions to support DS Annotations? 
I thought that was part of OSGi Compendium Release 7 and implemented by SCR 
since 2.1.0?

Can anyone say what the other SCR modules do since some of them have names 
indicating that I may need them?

SCR (Declarative Services)
SCR Annotations  - I'm guessing this is the "old" non-standard SCR annotations
SCR bnd Plugin
SCR Compat (Declarative Services) - Compatibility with what?
SCR DS Annotations - Is this not needed by the runtime to make DS Annotations 
work?
SCR Ext Anno
SCR Generator

Best regards
Per-Erik Svensson

-----Original Message-----
From: Davi Baldin Tavares <davi.bal...@gmail.com> 
Sent: 24 May 2019 12:48
To: users@felix.apache.org
Subject: Re: How to setup felix to enable OSGi DS Annotations

Hi, I’ve Ds running at my setup.

These are the bundles required for me to working

START LEVEL 1
   ID|State      |Level|Name
    0|Active     |    0|System Bundle (6.0.2)|6.0.2
   26|Active     |    1|JLine Bundle (3.7.0)|3.7.0
   27|Active     |    1|Apache Log4j API (2.11.2)|2.11.2
   28|Active     |    1|Apache Log4j Core (2.11.2)|2.11.2
   29|Active     |    1|Apache Log4j SLF4J Binding (2.11.2)|2.11.2
   32|Active     |    1|Apache Felix Bundle Repository (2.0.10)|2.0.10
   33|Active     |    1|Apache Felix Configuration Admin Service (1.9.12)|1.9.12
   34|Active     |    1|Apache Felix EventAdmin (1.5.0)|1.5.0
   35|Active     |    1|Apache Felix File Install (3.6.4)|3.6.4
   36|Active     |    1|Apache Felix Gogo Command (1.0.2)|1.0.2
   37|Active     |    1|Apache Felix Gogo JLine Shell (1.1.0)|1.1.0
   38|Active     |    1|Apache Felix Gogo Runtime (1.1.0)|1.1.0
   39|Active     |    1|Apache Felix Log Service (1.2.0)|1.2.0
   40|Active     |    1|Apache Felix Declarative Services (2.1.16)|2.1.16
   41|Active     |    1|org.osgi:org.osgi.util.function 
(1.1.0.201802012106)|1.1.0.201802012106
   42|Active     |    1|org.osgi:org.osgi.util.promise 
(1.1.1.201810101357)|1.1.1.201810101357
   44|Active     |    1|slf4j-api (1.7.25)|1.7.25
  
Osgi.util.function and promise I’ve downloaded from maven central repository.

Because I use Eclipse to build, org.osgi.service.component.annotations is 
optional (just for build)

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Siteview :: Plugins :: XXX
Bundle-SymbolicName: plugin.nmap;singleton:=true
Bundle-Version: 1.0.0
Automatic-Module-Name: plugin.unix
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ClassPath: .
Bundle-Vendor: Vendor
Require-Bundle: io.vendor.siteview.api;bundle-version="1.0.0",
 io.vendor.siteview.plugins;bundle-version="1.0.1"
Import-Package: javax.xml.parsers,
 org.osgi.framework,
 org.osgi.service.component.annotations;version="1.3.0";resolution:=optional,
 org.slf4j;version="1.7.2",
 org.w3c.dom,
 org.xml.sax
Service-Component: OSGI-INF/plugin.MyPluginClass.xml


Davi.


> On 24 May 2019, at 05:31, Per-Erik Svensson <per-e...@2c8.com> wrote:
> 
> Hi,
> 
> We have a product running Felix with SCR (and some other 
> felix-services like fileinstall), using it partly as a 
> plugin-mechanism and mostly to handle our own internal modules. This 
> means all our modules have a service component xml-file which I'm now 
> looking to "remove" through the use of OSGi DS Annotations. As I 
> understand it, SCR implements the spec but I'm not able to get it to 
> work. The bundle I'm trying to install throws the following error my 
> way
> 
> missing requirement [failing-bundle [46](R 46.0)] osgi.extender; 
> (&(osgi.extender=osgi.component)(version>=1.3.0)(!(version>=2.0.0))) 
> Unresolved requirements: [[failing-bundle [46](R 46.0)] osgi.extender; 
> (&(osgi.extender=osgi.component)(version>=1.3.0)(!(version>=2.0.0)))]
> 
> which according to some internet searches means that I don't have a proper 
> DS-implementation? Or have I misunderstood this?
> 
> 
>  1.  Version of felix framework is 6.0.0  2.  Version of SCR is 2.1.12  
> 3.  The failing bundle is built with maven-bundle-plugin version 4.1.0
> 
> When I look at the manifest of the failing bundle, it has the 
> following require-capability
> Require-Capability: 
> osgi.extender;filter:="(&(osgi.extender=osgi.component)(version>=1.3.0)(!(version>=2.0.0)))",osgi.service;filter:="(objectClass=se.conciliate.extensions.ui.Shell)";effective:=active,osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=11))"
> 
> And looking at SCR it has the following provide-capability
> 
> Provide-Capability: 
> osgi.extender;osgi.extender="osgi.component";uses:="org.osgi.service.component";version:Version="1.4",osgi.service;objectClass:List<String>="org.osgi.service.component.runtime.ServiceComponentRuntime";uses:="org.osgi.service.component.runtime"
> 
> Can anyone give any hints as to what I'm doing wrong. As I understand it, SCR 
> should provide the required capability (version ranges seem to check out too)?
> 
> Best regards,
> Per-Erik Svensson

Reply via email to