How can I resolve require-capability?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How can I resolve require-capability?

Christian Eugster
Hi
I am putting together an osgi enterprise framework from aries, because I want to use it in an eclipse rcp application. I am collecting the bundles from aries for the jndi, jpa, proxy, quiesce, transaction and util modules and their dependencies. For checking I run the framework like java -jar org.eclipse.osgi_3.13.0.v20180409-1500.jar -console

the collected bundles so far are:

Welcome to Apache Felix Gogo

g! ss                                                                                                        10:58:49
"Framework is launched."


id State       Bundle
0 ACTIVE      org.eclipse.osgi_3.13.0.v20180409-1500
                    Fragments=54
1 ACTIVE      org.eclipse.equinox.console_1.3.0.v20180119-0630
8 ACTIVE      org.apache.felix.gogo.runtime_1.1.0
9 ACTIVE      org.apache.felix.gogo.shell_1.0.0.v20170914-1324
10 ACTIVE      org.apache.felix.gogo.jline_1.1.0
11 ACTIVE      org.apache.felix.gogo.command_1.0.2
13 RESOLVED    org.jline_3.9.0
14 RESOLVED    org.apache.aries.jndi_1.0.0
15 RESOLVED    org.apache.aries.jndi.api_1.0.0
16 RESOLVED    org.apache.aries.jndi.core_1.0.0
17 RESOLVED    org.apache.aries.jndi.rmi_1.0.0
18 RESOLVED    org.apache.aries.jndi.url_1.0.0
19 RESOLVED    org.apache.aries.proxy_1.0.0
20 RESOLVED    org.apache.aries.proxy.api_1.0.0
21 RESOLVED    org.apache.aries.proxy.impl_1.0.0
26 RESOLVED    org.objectweb.asm_4.2.0
27 RESOLVED    org.objectweb.asm.commons_4.2.0
28 RESOLVED    org.objectweb.asm.tree_4.2.0
29 RESOLVED    slf4j.api_1.7.25
                    Fragments=31
31 RESOLVED    slf4j.nop_1.7.25
                    Master=29
32 RESOLVED    org.apache.log4j_1.2.13.v200706111418
33 RESOLVED    log4j.over.slf4j_1.7.25
34 RESOLVED    org.apache.aries.quiesce.api_1.0.0
35 RESOLVED    org.apache.aries.quiesce.manager_1.0.0
36 RESOLVED    org.apache.aries.transaction.jdbc_2.1.3
37 RESOLVED    org.apache.aries.transaction.jms_2.0.0
38 RESOLVED    org.apache.aries.transaction.manager_1.3.3
39 RESOLVED    org.apache.aries.transaction.wrappers_1.0.0
42 RESOLVED    org.osgi.service.cm_1.6.0.201802012106
50 RESOLVED    javax.enterprise.cdi-api_2.0.0
51 RESOLVED    javax.el-api_3.0.0
52 RESOLVED    org.apache.servicemix.bundles.javax-inject_1.0.0.3
53 RESOLVED    javax.interceptor-api_1.2.2
54 RESOLVED    javax.transaction_1.1.1.v201105210645
                    Master=0
55 RESOLVED    org.apache.aries.util_1.1.3
56 RESOLVED    org.glassfish.main.javaee-api.javax.jms_3.1.2.2
58 RESOLVED    org.apache.commons.pool_1.6.0
59 RESOLVED    org.glassfish.javax.resource_3.1.1
60 RESOLVED    org.apache.geronimo.components.geronimo-connector_3.1.4
61 RESOLVED    javax.validation.api_1.1.0.Final
62 INSTALLED   org.apache.aries.jpa.api_2.7.0
63 INSTALLED   org.apache.aries.jpa.container_2.7.0
64 INSTALLED   org.apache.aries.jpa.eclipselink.adapter_2.7.0
66 RESOLVED    org.osgi.service.jdbc_1.0.0.201505202023
67 RESOLVED    javax.persistence_2.0.6.v201308211412
68 RESOLVED    org.eclipse.persistence.oracle_2.5.0.v20130403-3bb7011
                    Master=71
69 RESOLVED    org.eclipse.persistence.jpa_2.5.0.v20130425-368d603
70 RESOLVED    org.eclipse.persistence.jpa.jpql_2.5.0.v20130425-368d603
71 RESOLVED    org.eclipse.persistence.core_2.5.0.v20130425-368d603
                    Fragments=68
72 RESOLVED    org.eclipse.persistence.asm_3.3.1.v201302191223
73 RESOLVED    org.eclipse.persistence.antlr_3.2.0.v201302191141
74 RESOLVED    javax.persistence_2.1.0.v201304241213

As you can see, I have two persistence api bundles (67, 74).

The bundles 64, 63, and 62 are not resolved due to missing Require-Capability. I searched the web for information about osgi.contract and require-capability (provide-capability), but to be honest, I do not really understand the concept, though it should simplify the dependency management. What am I to do to resolve the following requirements?


g! diag 64                                                                                                   10:58:49
org.apache.aries.jpa.eclipselink.adapter [64]
  Unresolved requirement: Require-Capability: osgi.contract; filter:="(&(osgi.contract=JavaJPA)(|(version=2)(version=2.1))(!(version>=2.2)))"

g! diag 63                                                                                                   10:59:05
org.apache.aries.jpa.container [63]
  Unresolved requirement: Require-Capability: osgi.contract; filter:="(&(osgi.contract=JavaJPA)(|(version=2)(version=2.1))(!(version>=2.2)))"

g! diag 62                                                                                                   10:59:20
org.apache.aries.jpa.api [62]
  Unresolved requirement: Require-Capability: osgi.contract; osgi.contract="JavaJPA"; filter:="(&(osgi.contract=JavaJPA)(version=2.0.0))"

Thank you

Christian

signature.asc (849 bytes) Download Attachment